A073738 Sum of every other prime <= n-th prime down to 2 or 1; equals the partial sums of A036467 (in which sums of two consecutive terms form the primes).
1, 2, 4, 7, 11, 18, 24, 35, 43, 58, 72, 89, 109, 130, 152, 177, 205, 236, 266, 303, 337, 376, 416, 459, 505, 556, 606, 659, 713, 768, 826, 895, 957, 1032, 1096, 1181, 1247, 1338, 1410, 1505, 1583, 1684, 1764, 1875, 1957, 2072, 2156, 2283, 2379, 2510, 2608
Offset: 0
Examples
a(10) = p_10 + p_8 + p_6 + p_4 + p_2 + p_0 = 29 + 19 + 13 + 7 + 3 + 1 = 72.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from Harvey P. Dale)
Programs
-
Haskell
a073738 n = a073738_list !! n a073738_list = tail zs where zs = 1 : 1 : zipWith (+) a006005_list zs -- Reinhard Zumkeller, Apr 28 2013
-
Maple
a:= proc(n) a(n):= `if`(n<1, n+1, ithprime(n) + a(n-2)) end: seq(a(n), n=0..50); # Alois P. Heinz, Jun 04 2021
-
Mathematica
nn=60;Join[{1},Sort[Join[Accumulate[Prime[Range[1,nn+1,2]]], 1+#&/@ Accumulate[Prime[Range[2,nn,2]]]]]] (* Harvey P. Dale, May 04 2011 *)
Formula
a(n) = Sum_{m<=n, m=n (mod 2)} p_m, where p_m is the m-th prime; that is, a(2n+k) = p_(2n+k) + p_(2(n-1)+k) + p_(2(n-2)+k) +... +p_k, for 0<=k<2, where a(0)=1 and the 0th prime is taken to be 1.
a(n) = prime(n) + a(n-2) for n >= 2. - Alois P. Heinz, Jun 04 2021
Comments