16

Let $r_3(n) = \left|\{(a,b,c)\in {\mathbb Z}^3 :\, a^2+b^2+c^2=n \}\right|$. I am looking for the maximum asymptotic size of $r_3(n)$. That is, the maximum number of representations that a number can have as a sum of three squares.

Gauss proved that $r_3(n) = \frac{A\sqrt{n}}{\pi}\sum_{m-1}^\infty\left(\frac{-n}{m}\right) \frac{1}{m}$ (where $\left(\frac{a}{b}\right)$ is the Jacobi-Legendre symbol). Another similar-looking formula can be found, for example, in the bottom of the first page of this paper

A simple and non-constructive argument shows that there are infinitely many $n$'s for which $r_3(n) \ge c\sqrt{n}$ (for some constant $c$). Moreover, in an old paper of Erdős he mentions that $r_3(n) \ge c\sqrt{n}\log \log n$ can also be obtained. Unfortunately, Erdős does not provide any details and only states "By deep number theoretic results".

More specifically, my questions are (1) how can one obtain Erdős' bound? (2) What $n$'s achieve the above bounds? (3) Can one use the above formula for $r_3(n)$ to show this?

Many thanks, Adam

Adam Sheffer
  • 1,052

2 Answers2

19

The formula for $r_3(n)$ essentially connects this with a class number of an imaginary quadratic field, or (apart from the $\sqrt{n}$ scaling) with the value of an $L$-function at $1$. So your question may be reformulated as asking how large can $L(1,\chi_{d})$ be as $d$ runs over negative fundamental discriminants ($d$ is essentially $-n$). The distribution of these values has been extensively investigated (see for example Granville and Soundararajan where you'll find more references. To create large values of $L(1,\chi_d)$ you should find a $d$ with $\chi_d(p)=1$ for all small primes $p$ up to some point $y$. One can do this with $d$ of size about $\exp(y)$. Then for most such $d$ one will have $$ L(1,\chi_d) \approx \prod_{p\le y} \Big(1-\frac{\chi_d(p)}{p} \Big)^{-1} \asymp \log \log |d| $$ by Mertens. Arguments of this type go back to Littlewood and Chowla (see the linked paper for references).

Lucia
  • 43,311
  • You beat me by one minute... – GH from MO Sep 07 '15 at 22:46
  • 2
    @GH from MO: That's too bad -- one of us could have saved their energy. – Lucia Sep 07 '15 at 22:47
  • 6
    No, it is fun! Let me upvote you... – GH from MO Sep 07 '15 at 22:52
  • Thank you both! I appreciate the help. If the solution is close to $\sqrt{n}$, I wonder what is wrong with the following argument that implies $n$. Consider the set of points in ${\mathbb Z}^3$ with all of their coordinates between $-n$ and $n$. A number with many representations corresponds to a sphere around the origin containing many points. Each point $a$ has a distance of $\sqrt{a_x^2+a_y^2+a_z^2}$ from the origin. Since there are about $n^3$ points and about $n^2$ distances, there must be a sphere with at least $n$ points (i.e., a distance with at least $n$ representations). – Adam Sheffer Sep 07 '15 at 23:22
  • 3
    @AdamSheffer: Nothing wrong with what you wrote; but note that if $n=a^2+b^2+c^2$ then $n$ is the square of the distance. (i.e. you just have a scaling issue in what you wrote) – Lucia Sep 07 '15 at 23:25
  • I have yet another question about this. Sorry for the multiple questions. In the formulas for $r_3(n)$ and $r^*_3(n)$, the value is zero if $n\equiv 7 mod 8$. How do I know that there is a value of $n$ for which both $L(1,\chi_d)$ is large and $n\not\equiv 7 mod 8$? – Adam Sheffer Sep 09 '15 at 19:51
  • Actually, that is for 0, 4, and 7. – Adam Sheffer Sep 09 '15 at 19:53
  • 2
    @AdamSheffer: In these arguments you can easily restrict $d$ to be in any progression that you want, and the result carries through. The constants in the bound may depend on the progressions. – Lucia Sep 09 '15 at 20:29
  • Thank you again Lucia. Hopefully I'm done with these questions. – Adam Sheffer Sep 09 '15 at 20:50
18

Let me restrict to the number of primitive representations $$r_3^\ast(n) = \left|\{(a,b,c)\in {\mathbb Z}^3 :\, a^2+b^2+c^2=n\ \text{and}\ \gcd(a,b,c)=1 \}\right|.$$ Note that $r_3(n)$ can be easily expressed from this quantity as $$r_3(n)=\sum_{d^2\mid n}r_3^\ast(n/d^2).$$ Clearly $r_3^*(n)=0$ when $n\equiv 0,4,7\pmod{8}$. For the remaining cases, it follows from the work of Gauss (1801) and Dirichlet (1839) on the class number that $$r_3^\ast(n) = \frac{24}{\pi}\,\sqrt{n}\,L\left(1,\left(\frac{D}{\cdot}\right)\right),$$ where $$D=\begin{cases} -4n,&n\equiv 1,2,5,6\pmod{8},\\ -n,&n\equiv 3\pmod{8}. \end{cases}$$ This tells us that the maximal (resp. minimal) order of $r_3^*(n)$ is determined by the maximal (resp. minimal) order of $L\left(1,\left(\frac{D}{\cdot}\right)\right)$, where $D$ depends on $n$ as above. Concerning the latter quantity, Littlewood (On the class-number of the corpus $P(\sqrt{-k})$, Proc. Lond. Math. Soc. (2) 27 (1928), 358-372) proved under GRH that $$ (\log\log|D|)^{-1}\ll L\left(1,\left(\frac{D}{\cdot}\right)\right)\ll \log\log|D|,$$ and he also proved in the same article that $L\left(1,\left(\frac{D}{\cdot}\right)\right)\gg\log\log|D|$ holds for infinitely many $D$'s. This last bound was proved unconditionally by Walfisz (On the class-number of binary quadratic forms, Trav. Inst. Math. Tbilissi 11 (1942), 57-71), and was further explicated by Granville-Soundararajan (The distribution of values of $L(1,\chi_d)$, Geom. Funct. Anal. 13 (2003), 992-1028). In particular, see Theorem 5b on page 998 in Granville-Soundararajan's paper, which is also available as an arXiv preprint.

In short, there are infinitely many $n$'s such that $r_3(n)\gg\sqrt{n}\log\log n$, and this is sharp under GRH.

GH from MO
  • 98,751
  • 1
    Thanks a lot! From looking at Chowla's paper (http://repository.ias.ac.in/8839/1/8839.pdf) it seems to me that he derived the opposite direction. That is, that there are many $n$'s with small $L$ values. Does this somehow imply a similar result for large value? – Adam Sheffer Sep 08 '15 at 21:35
  • 1
    @AdamSheffer: It seems I got confused with the references. It was Walfisz (1942) who proved that Littlewood's upper bound is sharp (apart from the constant), while Chowla (1947) proved that Littlewood's lower bound is sharp (apart from the constant). I will update my post with more precise references. (BTW I don't know a direct connection between the existence of small $L$-values and the existence of large $L$-values.) – GH from MO Sep 08 '15 at 21:59
  • 1
    Now it all makes sense :) – Adam Sheffer Sep 09 '15 at 00:50
  • There's something else that bothers me now (and I also wrote below the other answer). What if all of the $n$'s for which $L(1,\chi_d)$ is large are congruent to $0,4,7 \mod 8$? Then we still don't have the required bound for $r_3$. – Adam Sheffer Sep 09 '15 at 20:07
  • 2
    @AdamSheffer: In fact Walfisz's paper concentrates on the negative fundamental discriminants. These are precisely the discriminants $D$ that arise from the square-free $n$'s with $n\equiv 1,2,3,5,6\pmod{8}$, see the precise formula for $D$ in my post. – GH from MO Sep 09 '15 at 20:40
  • 1
    Thank you very much. Hopefully that's the end of these questions. – Adam Sheffer Sep 09 '15 at 20:51
  • 1
    @GHfromMO, should the expression for $r_3(n)$ involve a sum over $d^2 \mid n$, not $d \mid n$? – Peter Humphries Sep 30 '19 at 07:16
  • @PeterHumphries: Thanks, I fixed this! – GH from MO Sep 30 '19 at 13:32
  • Chowla and Walfisz both deal with large negative discriminants, showing there are plenty of small and large values respectively. What I want to know is that there are infinitely many discriminants (say d congruent to 1 mod 4) with $L(1,\chi) > c \sqrt d \log \log d$ for some explicit $c$. And anything else one can prove about such d. – Michael Beeson Feb 16 '22 at 05:44
  • @MichaelBeeson Check out the paper that Lucia quoted. Theorem 5b says that for large $x$ there are at least $x^{1/10}$ square-free integers $d\leq x$ such that $L\bigl(1,\bigl(\frac{\cdot}{d}\bigr)\bigr)\geq e^\gamma(\log_2 x+\log_3 x-\log_4 x-10)$, where $\log_k x$ is the $k$ times iterated logarithm. – GH from MO Feb 16 '22 at 17:25