OFFSET
0,2
COMMENTS
For purposes of this sequence, 1 is treated as a prime. - Harvey P. Dale, Jul 24 2013
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = Sum_{m<=n, m=n (mod 3)} p_m, where p_m is the m-th prime; that is, a(3n+k) = p_(3n) + p_(3(n-1)) + p_(3(n-2)) + ... + p_k, for 0<=k<3, where a(0)=1 and the 0th prime is taken to be 1.
EXAMPLE
a(10) = p_10 + p_7 + p_4 + p_1 = 29 + 17 + 7 + 2 = 55.
MATHEMATICA
a[0] = 1; a[-1] = 0; a[-2] = 0; p[0] = 1; p[n_?Positive] := Prime[n]; a[n_] := a[n] = p[n] - a[n-1] - a[n-2]; Table[a[n], {n, 0, 60}] // Accumulate (* Jean-François Alcover, Jun 25 2013 *)
Sort[Flatten[Accumulate/@Transpose[Partition[Join[{1}, Prime[Range[61]]], 3]]]] (* Harvey P. Dale, Jul 24 2013 *)
PROG
(Haskell)
a073736 n = a073736_list !! n
a073736_list = scanl1 (+) a073737_list
-- Reinhard Zumkeller, Apr 28 2013
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Paul D. Hanna, Aug 07 2002
STATUS
approved