1
$\begingroup$

Let $x$ be a sufficiently large number. Is there an explicit or asymptotic formula for the following sum $$\sum_{\substack{n\leq x\\ n=a^2+b^2+c^2}} 1.$$ Any reference would be helpful.

$\endgroup$
2
  • 6
    $\begingroup$ Every number that is not of the form $4^a(8b + 7)$, $a,b \geq 0$, can be written as the sum of three squares. $\endgroup$ Commented Oct 2 at 23:11
  • $\begingroup$ Thanks for the information I know that and I would like to find a formula for that sum. $\endgroup$ Commented Oct 2 at 23:14

1 Answer 1

10
$\begingroup$

The number of integers $n\leq x$ that are not the sum of three squares is \begin{align*} \sum_{4^k(8\ell+7)\leq x}1 &=\sum_{4^k\leq x/7}\left\lfloor\frac{1}{8}\left(\frac{x}{4^k}+1\right)\right\rfloor\\ &=\sum_{4^k\leq x/7}\left(\frac{x}{8\cdot 4^k}+O(1)\right)\\ &=\frac{x}{8}\sum_{k=0}^\infty\frac{1}{4^k}+O(\log x)\\ &=\frac{1}{6}x+O(\log x). \end{align*} Hence the number of integers $n\leq x$ that are the sum of three squares is $$\frac{5}{6}x+O(\log x).$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .