OFFSET
0,2
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
S. K. K. Choi, A. V. Kumchev and R. Osburn, On sums of three squares, arXiv:math/0502007 [math.NT], 2005.
FORMULA
a(n) ~ (4/3)*Pi*n^(3/2) ~ A210639(n).
a(n) = A122510(3,n). - R. J. Mathar, Apr 21 2010
G.f.: T3(q)^3/(1-q) where T3(q) = 1 + 2*Sum_{k>=1} q^(k^2). - Joerg Arndt, Apr 08 2013
EXAMPLE
a(2) = 1 + 6 + 12 = 19, since (0,0,0) and (0, 0, +-1) and cyclic permutations (for a total of 6 points), and +-(0, 1, +-1) and cyclic permutations (for a total 12 points) are inside or on x^2 + y^2 + z^2 = 2.
MATHEMATICA
Table[Sum[SquaresR[3, k], {k, 0, n}], {n, 0, 50}] (* T. D. Noe, Apr 08 2006, revised Sep 27 2011 *)
PROG
(PARI) A117609(n)=sum(x=0, sqrtint(n), (sum(y=1, sqrtint(t=n-x^2), 1+2*sqrtint(t-y^2))*2+sqrtint(t)*2+1)*2^(x>0)) \\ M. F. Hasler, Mar 26 2012
(PARI) q='q+O('q^66); Vec((eta(q^2)^5/(eta(q)^2*eta(q^4)^2))^3/(1-q)) /* Joerg Arndt, Apr 08 2013 */
(Python)
# uses Python code for A057655
from math import isqrt
def A117609(n): return A057655(n)+(sum(A057655(n-k**2) for k in range(1, isqrt(n)+1))<<1) # Chai Wah Wu, Jun 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
John L. Drost, Apr 06 2006
STATUS
approved