login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229295 Number of solutions to x^2 + y^2 + z^2 == n (mod 2n) for x,y,z in [0, 2*n). 4
4, 24, 36, 32, 100, 216, 196, 192, 396, 600, 484, 288, 676, 1176, 900, 256, 1156, 2376, 1444, 800, 1764, 2904, 2116, 1728, 2900, 4056, 3564, 1568, 3364, 5400, 3844, 1536, 4356, 6936, 4900, 3168, 5476, 8664, 6084, 4800, 6724, 10584, 7396, 3872, 9900, 12696 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All values are divisible by a(1)=4 and the sequence a(n)/4 is multiplicative. - Andrew Howroyd, Aug 07 2018
LINKS
FORMULA
a(n) = 4*A087687(n) for odd n, a(4^k) = 4*2^(3*k), a(2*4^k) = 24*2^(3*k). - Andrew Howroyd, Aug 07 2018
MATHEMATICA
A[n_] := Sum[If[Mod[a^2 + b^2 + c^2, 2*n] == n, 1, 0], {a, 0, 2*n - 1}, {b, 0, 2*n - 1}, {c, 0, 2*n - 1}]; Array[A, 100]
PROG
(PARI) a(n)={my(m=2*n); my(p=Mod(sum(i=0, m-1, x^(i^2%m)), x^m-1)^3); polcoeff( lift(p), n)} \\ Andrew Howroyd, Aug 06 2018
(PARI) a(n)={my(f=factor(n)); 4*prod(i=1, #f~, my([p, e]=f[i, ]); if(p==2, if(e%2, 3, 1)*2^(e+e\2), p^(e+(e-1)\2)*(p^(e\2)*(p+1) - 1)))} \\ Andrew Howroyd, Aug 07 2018
CROSSREFS
Sequence in context: A366190 A176900 A166727 * A007544 A333655 A189228
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)