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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A255643 Difference between sums of quadratic residues and non-residues modulo n that are coprime to n. 3
0, 1, -1, -2, 0, -4, -7, -14, -3, 0, -11, -22, 0, 0, -50, -44, 0, -12, -19, -60, -84, -44, -69, -94, 0, 0, -9, -98, 0, -80, -93, -152, -176, 0, -280, -138, 0, -76, -312, -300, 0, -126, -43, -286, -330, 0, -235, -332, -49, 0, -476, -364, 0, -36, -660, -602, -570, 0, -177, -380, 0, 0, -630, -560, -780, -374, -67, -680, -782, -560, -497, -714, 0, 0, -850, -798, -1232, -468, -395, -1080, -27, 0, -249, -882, -1360, -172, -1508, -1430, 0, -600, -1820, -1058, -1674, 0, -2090, -1240, 0, 0, -1518, -1100 (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) = A255644(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(gcd(i, n)>1, next); if(issquare(Mod(i, n)), r+=i, r-=i) ); r }

CROSSREFS

C.f. A228131, A255644

Sequence in context: A190791 A002885 A011121 * A230277 A117902 A021087

Adjacent sequences:  A255640 A255641 A255642 * A255644 A255645 A255646

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 September 16 06:21 EDT 2019. Contains 327090 sequences. (Running on oeis4.)