|
|
A090396
|
|
Remainder when the sum of the first n primes is divided by n.
|
|
6
|
|
|
0, 1, 1, 1, 3, 5, 2, 5, 1, 9, 6, 5, 4, 1, 13, 13, 15, 15, 17, 19, 19, 21, 0, 3, 10, 17, 22, 27, 1, 3, 15, 27, 8, 19, 1, 15, 31, 11, 28, 7, 27, 3, 26, 3, 23, 41, 20, 5, 37, 17, 46, 25, 0, 33, 13, 49, 30, 7, 43, 19, 52, 29, 14, 61, 41, 19, 5, 59, 50, 37, 22, 7, 67, 55, 43, 29, 15, 3, 68, 57
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
N:= 1000; # to get the first N terms
pN:= ithprime(N):
C:= map(round, Statistics:-CumulativeSum(select(isprime, [$1..pN])));
|
|
MATHEMATICA
|
t = Table[Mod[ Sum[Prime[i], {i, 1, n}], n], {n, 1, 100}]
Module[{nn=80, pr}, pr=Accumulate[Prime[Range[nn]]]; Table[Mod[pr[[n]], n], {n, nn}]] (* Harvey P. Dale, Jul 03 2019 *)
|
|
PROG
|
(PARI) a(n) = sum(k=1, n, prime(k)) % n;
|
|
CROSSREFS
|
Cf. A060620 (corresponding floor quotients).
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|