A303743 a(n) is a number of lattice points in 3D Cartesian grid between cube with edge length 2*n centered in origin and its inscribed sphere. Three pairs of the cube's faces are parallel to the planes XOY, XOZ, YOZ respectively.
0, 0, 8, 92, 220, 412, 784, 1272, 1848, 2696, 3692, 5020, 6460, 8176, 10248, 12720, 15464, 18476, 21988, 25924, 30016, 35040, 40248, 46052, 52388, 59132, 66364, 74416, 83256, 92304, 102500, 112988, 124076, 136252, 148936, 162648, 176928, 192332, 208100, 225284, 243088
Offset: 1
Keywords
Examples
For n=3 we have 8 points between the defined cube and its inscribed sphere: (-2,-2,-2) (-2,-2, 2) (-2, 2,-2) (-2, 2, 2) ( 2,-2,-2) ( 2,-2, 2) ( 2, 2,-2) ( 2, 2, 2)
Programs
-
PARI
a(n) = sum(x=-n+1, n-1, sum(y=-n+1, n-1, sum(z=-n+1, n-1, x*x+y*y+z*z>n^2))); \\ Michel Marcus, Jun 23 2018
-
Python
for n in range (1, 42): count=0 n2 = n*n for x in range(-n+1, n): for y in range(-n+1, n): for z in range(-n+1, n): if x*x+y*y+z*z > n2: count += 1 print(count)
Comments