|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|