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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230366 Sum_{k=1..floor(n/2)} (k^2 mod n). 0
0, 1, 1, 1, 5, 8, 7, 6, 12, 25, 22, 19, 39, 42, 35, 28, 68, 69, 76, 65, 91, 110, 92, 74, 125, 169, 144, 147, 203, 190, 186, 152, 242, 289, 245, 201, 333, 342, 286, 270, 410, 413, 430, 363, 420, 460, 423, 340, 490, 575, 578, 585, 689, 666, 605, 546, 760, 841 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

a(26) and a(27) are both squares. Conjecture: number of n such that a(n) and a(n+1) are both squares is infinite.

a(p = prime) == 0 mod p for p > 3.

LINKS

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

MATHEMATICA

Table[Sum[Mod[k^2, n], {k, Floor[n/2]}], {n, 100}] (* T. D. Noe, Oct 22 2013 *)

PROG

(JavaScript)

for (i=1; i<50; i++) {

c=0;

for (j=1; j<=i/2; j++) c+=(j*j)%i;

document.write(c+", ");

}

(PARI) a(n)=sum(i=1, floor(n/2), (i*i)%n) \\ Ralf Stephan, Oct 19 2013

CROSSREFS

Cf. A048153.

Sequence in context: A021867 A165909 A243598 * A197415 A019845 A143618

Adjacent sequences:  A230363 A230364 A230365 * A230367 A230368 A230369

KEYWORD

nonn

AUTHOR

Jon Perry, Oct 17 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 February 20 14:14 EST 2020. Contains 332078 sequences. (Running on oeis4.)