cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A071782 Sum of distinct squares in Z_n (mod n).

Original entry on oeis.org

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
Offset: 1

Views

Author

Santi Spadaro, Jun 24 2002

Keywords

Comments

a(n)=0 for prime n>3. - T. D. Noe, Sep 06 2005

Programs

  • Mathematica
    a[n_] := Mod[Apply[Plus, Union[Table[Mod[i^2, n], {i, 1, n}]]], n]
  • PARI
    A071782(n) = (vecsum(Set(vector(n,i,(i^2)%n)))%n); \\ Antti Karttunen, Feb 18 2023