cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A102066 Sum of the first n primes, mod 6.

Original entry on oeis.org

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
Offset: 1

Views

Author

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

Keywords

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.

Examples

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

References

  • H. L. Nelson, "Prime Sums", J. Rec. Math., 14 (1981), 205-206.

Crossrefs

Programs

  • Mathematica
    Mod[Accumulate[Prime[Range[120]]],6] (* Harvey P. Dale, Jun 19 2014 *)
  • PARI
    a(n) = sum(i=1, n, prime(i)) % 6 \\ Michel Marcus, Jul 12 2013

Formula

sum(p(n)) mod 6.

Extensions

More terms from Harvey P. Dale, Jun 19 2014