login
A396333
Number of ordered triples of integers (x,y,z) with 0 <= x <= y <= z and x^2 + y^2 + z^2 < n^2.
1
0, 1, 4, 8, 15, 25, 40, 56, 79, 106, 141, 179, 224, 278, 341, 408, 488, 572, 672, 779, 899, 1028, 1169, 1324, 1491, 1669, 1869, 2077, 2306, 2539, 2800, 3064, 3363, 3668, 3996, 4341, 4705, 5090, 5489, 5916, 6364, 6825, 7323, 7834, 8377, 8937, 9524, 10127, 10764
OFFSET
0,3
LINKS
FORMULA
The sequence a(n)/n^3 converges to Pi/36 as n->oo.
EXAMPLE
The integer triples (x,y,z) with 0 <= x <= y <= z and x^2 + y^2 + z^2 < 2^2 are exactly [0, 0, 0], [0, 0, 1], [0, 1, 1] and [1, 1, 1], so a(2) = 4.
PROG
(PARI) a(n) = sum(z=0, n, sum(y=0, z, sum(x=0, y, x^2+y^2+z^2 < n^2)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Marc Rebert, May 22 2026
STATUS
approved