login
A066913
(sum of primes < n that do not divide n) (mod n).
1
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,3
LINKS
FORMULA
a(n) = A066911(n) modulo n. - Michel Marcus, May 20 2014
a(prime(n)) = A071089(n). - Michel Marcus, May 20 2014
EXAMPLE
a(8) = (3 + 5 + 7) (mod 8) = 7 because 3, 5 and 7 are the primes < 8 that do not divide 8.
MATHEMATICA
Table[Mod[Total[Select[Prime[Range[PrimePi[n]]], Mod[n, #]!=0&]], n], {n, 80}] (* Harvey P. Dale, Aug 06 2019 *)
PROG
(PARI) a(n) = sum(i=1, n-1, if (isprime(i) && (n%i), i)) % n; \\ Michel Marcus, May 20 2014
CROSSREFS
Sequence in context: A199514 A080367 A354365 * A090303 A277516 A322333
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 22 2002
STATUS
approved