Consider 2-electron integrals over real basis functions of the form $$(\mu\nu|\lambda\sigma) = \int d\vec{r}_{1}d\vec{r}_{2} \phi_{\mu}(\vec{r}_{1}) \phi_{\nu}(\vec{r}_{1}) r_{12}^{-1} \phi_{\lambda}(\vec{r}_{2}) \phi_{\sigma}(\vec{r}_{2})$$ I am told that for a basis set of size K=100, there are 12,753,775 unique 2-electron integrals of this form.
Symmetry considerations mean that we have less than $K^{4}$ unique integrals, since we can exchange electrons and also exchange the basis functions for each electron without changing the value of the integral.
How could one work out the number of unique integrals?
My method is:
Find the number of unique integrals of the forms $(\mu\nu|\lambda\sigma)$, $(\mu\mu|\lambda\sigma)$, $(\mu\mu|\nu\nu)$ and $(\mu\mu|\mu\mu)$ (where in these integrals, each index is unique unless repeated) and sum these together.
My working gives the wrong answer, though:
$$\frac{4!}{8}{100 \choose 4}+\frac{3!}{4}{100 \choose 3}+\frac{2!}{2}{100 \choose 2}+1!{100 \choose 1} = 12,011,275$$
My rationale is this: for the integral form $(\mu\nu|\lambda\sigma)$, there are ${100 \choose 4}$ unique unordered combinations of basis functions. There are $4!$ ways of arranging these unique basis functions. We can exchange the electrons, basis functions on electron 1 and basis functions on electron 2 without changing the value of the integral, thus halving the number of unique integrals 3 times ($\frac{1}{2}\times\frac{1}{2}\times\frac{1}{2}=\frac{1}{8}$). Therefore the number of unique integrals of form $(\mu\nu|\lambda\sigma)$ is $\frac{4!}{8}{100 \choose 4}$.
Where am I going wrong?