login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087687 Number of solutions to x^2 + y^2 + z^2 == 0 mod n. 3
1, 4, 9, 8, 25, 36, 49, 32, 99, 100, 121, 72, 169, 196, 225, 64, 289, 396, 361, 200, 441, 484, 529, 288, 725, 676, 891, 392, 841, 900, 961, 256, 1089, 1156, 1225, 792, 1369, 1444, 1521, 800, 1681, 1764, 1849, 968, 2475, 2116, 2209, 576, 2695, 2900, 2601 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

To show that a(n) is multiplicative is simple number theory. If gcd(n,m)=1, then any solution of x^2+y^2+z^2 = 0 mod (n) and any solution (mod m) can combined to a solution (mod nm) using the Chinese Remainder Theorem and any solution (mod nm) gives solutions (mod n) and (mod m). Hence a(nm)=a(n)a(m). - Torleiv Kløve, Jan 26 2009

LINKS

Robert Gerbicz, Aug 22 2006, Table of n, a(n) for n = 1..80

L. Tóth, Counting solutions of quadratic congruences in several variables revisited, arXiv preprint arXiv:1404.4214, 2014

FORMULA

a(2^k) = 2^(k+ceil(k/2)). For odd primes p, a(p^(2k-1)) = p^(3k-2)*(p^k+p^(k-1)-1) and a(p^(2k)) = p^(3k-1)*(p^(k+1)+p^k-1). - Martin Fuller, Jan 26 2009

PROG

(PARI) a(n)=local(v=vector(n), w); for(i=1, n, v[i^2%n+1]++); w=vector(n, i, sum(j=1, n, v[j]*v[(i-j)%n+1])); sum(j=1, n, w[j]*v[(1-j)%n+1]) \\ Martin Fuller

CROSSREFS

Cf. A086933, A062775. Different from A064549.

Sequence in context: A072995 A073395 A064549 * A264090 A168175 A164382

Adjacent sequences:  A087684 A087685 A087686 * A087688 A087689 A087690

KEYWORD

mult,nonn

AUTHOR

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

EXTENSIONS

More terms from Robert Gerbicz, Aug 22 2006

Edited by Steven Finch, Feb 06 2009, Feb 12 2009

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 28 16:14 EDT 2017. Contains 287241 sequences.