A386315 Number of points in a face-centered cubic lattice that intersect a sphere of radius n centered on a point in the lattice.
1, 12, 12, 36, 12, 84, 36, 108, 12, 108, 84, 132, 36, 180, 108, 252, 12, 204, 108, 228, 84, 324, 132, 300, 36, 444, 180, 324, 108, 372, 252, 396, 12, 396, 204, 756, 108, 468, 228, 540, 84, 492, 324, 516, 132, 756, 300, 588, 36, 780, 444, 612, 180, 660, 324
Offset: 0
Examples
a(3) = 36, which is the sum of 4 90-degree rotations of [3, 0, 0], 8 90-degree rotations and vertical reflections of [3/2, 3/2, 3*sqrt(1/2)] and [1, 0, 4*sqrt(1/2)], and 16 90-degree rotations and vertical and horizontal reflections of [5/2, 3/2, sqrt(1/2)].
Links
- Charles L. Hohn, a(0) to a(15), animated - see Comments
Programs
-
PARI
a(n)={my(c=0); for(x=0, n, for(y=0, min(x, sqrtint(n^2-x^2)), for(o=0, 1, my(m=2*(n^2-(x+o/2)^2-(y+o/2)^2)); if(!issquare(m), next); my(z=sqrtint(m)); if(z>=0 && z%2==o, c+=2^(4-if(!z, 1)-if(x==y, 1)-if(!min(x, y) && !o, 1)-if(!vecmax([x, y, z, o]), 1)))))); c}
-
PARI
a(n)={if(!n, return(1)); my(f=Vec(factor(n)), o=12, r=o); for(i=if(#f[1] && f[1][1]==2, 2, 1), #f[1], my(m=if(f[1][i]%8>=4, 2)); f[2][i]++; while(f[2][i]--, o=o*f[1][i]+r*m); r=o); o}
Formula
a(n) = A004015(n^2).
a(2*n) = a(n).
a(p*n) = p*a(n) where p is a prime and p mod 8 is in {1, 3}.
a(p*n) = p*a(n) + 2*a(n/p^c) where p is a prime, p mod 8 is in {5, 7}, and c is the count of prime factors p in n.
Comments