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!)
A071782 Sum of distinct squares in Z_n (mod n). 2
0, 1, 1, 1, 0, 2, 0, 5, 3, 5, 0, 2, 0, 0, 0, 14, 0, 6, 0, 15, 7, 0, 0, 18, 0, 13, 18, 0, 0, 0, 0, 8, 0, 17, 0, 24, 0, 0, 13, 15, 0, 14, 0, 22, 0, 0, 0, 28, 0, 25, 0, 39, 0, 9, 0, 28, 19, 29, 0, 30, 0, 0, 21, 32, 0, 0, 0, 17, 0, 0, 0, 36, 0, 37, 50, 38, 0, 26, 0, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
a(n)=0 for prime n>3. - T. D. Noe, Sep 06 2005
LINKS
MATHEMATICA
a[n_] := Mod[Apply[Plus, Union[Table[Mod[i^2, n], {i, 1, n}]]], n]
PROG
(PARI) A071782(n) = (vecsum(Set(vector(n, i, (i^2)%n)))%n); \\ Antti Karttunen, Feb 18 2023
CROSSREFS
Sequence in context: A021491 A324654 A121705 * A328495 A297024 A356215
KEYWORD
nonn
AUTHOR
Santi Spadaro, Jun 24 2002
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 April 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)