

A102066


Sum of the first n primes, mod 6.


0



2, 5, 4, 5, 4, 5, 4, 5, 4, 3, 4, 5, 4, 5, 4, 3, 2, 3, 4, 3, 4, 5, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 2, 3, 2, 3, 4, 5, 4, 3, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 4, 3, 4, 3, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Curiosity, it takes almost 60 terms before 1 and 0 appear. Stability arises from near equal (often alternating) occurrences of p mod 6 = 1 and p mod 6 = 5.


REFERENCES

H. L. Nelson, "Prime Sums", J. Rec. Math., 14 (1981), 205206.


LINKS



FORMULA

sum(p(n)) mod 6.


EXAMPLE

a(5) = 4 since (2+3+5+7+11) mod 6 = 4.


MATHEMATICA

Mod[Accumulate[Prime[Range[120]]], 6] (* Harvey P. Dale, Jun 19 2014 *)


PROG

(PARI) a(n) = sum(i=1, n, prime(i)) % 6 \\ Michel Marcus, Jul 12 2013


CROSSREFS



KEYWORD

easy,nonn


AUTHOR

Alan Sutcliffe (alansut(AT)ntlworld.com), Dec 28 2004


EXTENSIONS



STATUS

approved



