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.

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).

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Aug 07 2002

Keywords

Examples

			a(10) = p_10 + p_8 + p_6 + p_4 + p_2 + p_0 = 29 + 19 + 13 + 7 + 3 + 1 = 72.
		

Crossrefs

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