login
This site is supported by donations 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

Table of n, a(n) for n=1..100.

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

C.f. A228131, A255643

Sequence in context: A097898 A154884 A201560 * A059678 A079642 A221483

Adjacent sequences:  A255641 A255642 A255643 * A255645 A255646 A255647

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 14:47 EDT 2019. Contains 328114 sequences. (Running on oeis4.)