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.

This page as a plain text file.
%I A102066 #6 Jun 19 2014 12:25:12
%S A102066 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,
%T A102066 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,
%U A102066 2,3,2,1,2,3,4,3,2,3,2,3,2,3,2,3,4,3
%N A102066 Sum of the first n primes, mod 6.
%C A102066 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.
%D A102066 H. L. Nelson, "Prime Sums", J. Rec. Math., 14 (1981), 205-206.
%F A102066 sum(p(n)) mod 6.
%e A102066 a(5) = 4 since (2+3+5+7+11) mod 6 = 4.
%t A102066 Mod[Accumulate[Prime[Range[120]]],6] (* _Harvey P. Dale_, Jun 19 2014 *)
%o A102066 (PARI) a(n) = sum(i=1, n, prime(i)) % 6 \\ _Michel Marcus_, Jul 12 2013
%Y A102066 Cf. A007504, A103208.
%K A102066 easy,nonn
%O A102066 1,1
%A A102066 Alan Sutcliffe (alansut(AT)ntlworld.com), Dec 28 2004
%E A102066 More terms from _Harvey P. Dale_, Jun 19 2014