login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

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

Andrew Howroyd, Table of n, a(n) for n = 1..2500

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

Cf. A087687, A229294, A229296, A229297.

Sequence in context: A180924 A176900 A166727 * A007544 A333655 A189228

Adjacent sequences:  A229292 A229293 A229294 * A229296 A229297 A229298

KEYWORD

nonn

AUTHOR

José María Grau Ribas, Sep 22 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 16 06:48 EST 2021. Contains 340204 sequences. (Running on oeis4.)