login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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), 205-206.
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
Sequence in context: A299212 A249018 A235052 * A279404 A072970 A276320
KEYWORD
easy,nonn
AUTHOR
Alan Sutcliffe (alansut(AT)ntlworld.com), Dec 28 2004
EXTENSIONS
More terms from Harvey P. Dale, Jun 19 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:46 EDT 2024. Contains 371782 sequences. (Running on oeis4.)