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.

A066913 (sum of primes < n that do not divide n) (mod n).

Original entry on oeis.org

0, 0, 2, 3, 0, 5, 3, 7, 5, 0, 6, 11, 2, 4, 3, 7, 7, 17, 1, 10, 4, 20, 8, 23, 20, 7, 16, 7, 13, 29, 5, 30, 14, 5, 8, 11, 12, 24, 25, 30, 33, 16, 23, 4, 3, 26, 46, 35, 27, 21, 2, 1, 10, 52, 35, 36, 17, 2, 27, 10, 13, 34, 50, 51, 28, 23, 32, 5, 59, 64, 0, 58, 55, 7, 29, 7, 1, 70, 1
Offset: 1

Views

Author

Leroy Quet, Jan 22 2002

Keywords

Examples

			a(8) = (3 + 5 + 7) (mod 8) = 7 because 3, 5 and 7 are the primes < 8 that do not divide 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Total[Select[Prime[Range[PrimePi[n]]],Mod[n,#]!=0&]],n],{n,80}] (* Harvey P. Dale, Aug 06 2019 *)
  • PARI
    a(n) = sum(i=1, n-1, if (isprime(i) && (n%i), i)) % n; \\ Michel Marcus, May 20 2014

Formula

a(n) = A066911(n) modulo n. - Michel Marcus, May 20 2014
a(prime(n)) = A071089(n). - Michel Marcus, May 20 2014