The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A255644 Difference between sums of quadratic residues and non-residues modulo n (residues are not necessarily coprime to n). 2
0, 1, -1, -4, 0, 1, -7, -18, -12, 5, -11, -38, 0, -7, -45, -92, 0, -33, -19, -120, -70, -11, -69, -192, -50, 13, -99, -210, 0, -135, -93, -352, -198, 17, -245, -438, 0, -19, -325, -510, 0, -245, -43, -550, -540, -115, -235, -880, -196, -175, -459, -728, 0, -333, -715, -1036, -532, 29, -177, -1230, 0, -155, -1155, -1440, -780, -693, -67, -1292, -966, -875, -497, -1908, 0, 37, -1325, -1558, -1232, -1079, -395, -2500, -864, 41, -249, -2366, -1360, -43, -1479, -2552, 0, -2025, -1729, -2346, -1426, -423, -2185, -3568, 0, -637, -2673, -3000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
For prime n, a(n) = A228131(n) = A255643(n).
For prime n==1 (mod 4), a(n) = 0.
For prime n==3 (mod 4) and n > 3, i.e., n=A002145(m) for m > 1, a(n) = -n*A002143(m).
PROG
(PARI) { A255643(n) = my(r); r=0; for(i=0, n-1, if(issquare(Mod(i, n)), r+=i, r-=i) ); r }
CROSSREFS
Sequence in context: A338813 A334385 A201560 * A355174 A059678 A079642
KEYWORD
sign
AUTHOR
Max Alekseyev, Mar 01 2015
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 May 13 15:39 EDT 2024. Contains 372521 sequences. (Running on oeis4.)