Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 May 24 2021 07:33:11
%S 0,0,8,92,220,412,784,1272,1848,2696,3692,5020,6460,8176,10248,12720,
%T 15464,18476,21988,25924,30016,35040,40248,46052,52388,59132,66364,
%U 74416,83256,92304,102500,112988,124076,136252,148936,162648,176928,192332,208100,225284,243088
%N 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.
%C If two parallel faces of the inscribed cube are parallel XOY-plane and other two pairs are parallel planes x=y and x=-y respectively we'll have another sequence.
%F a(n) = A016755(n-1) - A000605(n) - 6.
%e For n=3 we have 8 points between the defined cube and its inscribed sphere:
%e (-2,-2,-2)
%e (-2,-2, 2)
%e (-2, 2,-2)
%e (-2, 2, 2)
%e ( 2,-2,-2)
%e ( 2,-2, 2)
%e ( 2, 2,-2)
%e ( 2, 2, 2)
%o (Python)
%o for n in range (1, 42):
%o count=0
%o n2 = n*n
%o for x in range(-n+1, n):
%o for y in range(-n+1, n):
%o for z in range(-n+1, n):
%o if x*x+y*y+z*z > n2:
%o count += 1
%o print(count)
%o (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
%Y Cf. A000605, A016755.
%Y For the 2D case see A303642.
%K nonn
%O 1,3
%A _Kirill Ustyantsev_, Apr 29 2018