Skip to main content
11 events
when toggle format what by license comment
Sep 3, 2021 at 3:46 comment added David E Speyer I missed that the original question asked for a generating function. As a generating function, I don't think you'll do better than LeechLattice's comment (you can give a different formula, but I don't think a better one), so I was probably unfair to LeechLattice.
Sep 3, 2021 at 3:37 comment added David E Speyer The number of ideals of index $n$ is a multiplicative function of $n$, so we just have to do the prime power case. For $p \equiv 1$ or $3 \bmod 8$, there are $k+1$ ideals of index $p^k$; for $p \equiv 5$ or $7 \bmod 8$, there are no ideals of index $p^k$ for $k$ odd and one for $k$ even. Finally, there is one ideal of index $2^k$ for any $k$. Put that all together in a multiplicative function, and then deal with the details of signs and the factor of $2$ from the unit group, and you'll get a formula analogous to mathworld.wolfram.com/SumofSquaresFunction.html
Sep 3, 2021 at 3:35 comment added David E Speyer For $n = 2 k^2 + m^2$, there is a similar formula. Ignoring the condition that $k$ and $m$ be positive, we are counting elements in $\mathbb{Z}[\sqrt{-2}]$ of norm $n$. Since $\mathbb{Z}[\sqrt{-2}]$ is a PID and has unit group $\pm 1$, the number of elements of number $n$ is twice the number of ideals of index $n$.
Sep 3, 2021 at 3:33 comment added David E Speyer For $n = 4 k^2 + m^2$, look at the formula for the number of ways to write $n$ as $\ell^2+m^2$ mathworld.wolfram.com/SumofSquaresFunction.html . If $n \equiv 1 \bmod 4$, then half of these will have $\ell$ even and half will have $\ell$ odd; if $n \equiv 0 \bmod 4$, then all solutions have $\ell$ even; if $n \equiv 2 \bmod 4$ or $3 \bmod 4$, there are no solutions with $\ell$ even.
Sep 3, 2021 at 3:30 comment added David E Speyer Uh, guys, this is a perfectly reasonable question. It could be assigned as homeowrk in an algebraic number theory course, but that doesn't mean that every mathematician knows how to do it, and it has much better answers than the one LeechLattice gives.
Sep 3, 2021 at 1:17 review Close votes
Sep 14, 2021 at 3:02
Sep 3, 2021 at 1:01 comment added user44191 This is not research-level math; further, it looks like homework. As such, it does not belong on mathoverflow, which is for research-level problems. It may be better suited for math.stackexchange; however, if you do choose to post there, you should give more context - especially by showing what you have tried to do and where you are stuck. See math.stackexchange.com/help/how-to-ask for more information.
Sep 2, 2021 at 22:56 comment added LeechLattice Is this a reasonable answer: $\sum_{n=1}^{\infty} s(n)x^n=\sum_{p=1}^{\infty} x^{p^2} \sum_{q=1}^{\infty} x^{2q^2}$?
Sep 2, 2021 at 22:54 history edited Ali CC BY-SA 4.0
added 27 characters in body
S Sep 2, 2021 at 22:49 review First questions
Sep 3, 2021 at 7:30
S Sep 2, 2021 at 22:49 history asked Ali CC BY-SA 4.0