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.

A262392 a(n) = A007504(n) + A010693(n).

Original entry on oeis.org

2, 5, 7, 13, 19, 31, 43, 61, 79, 103, 131, 163, 199, 241, 283, 331, 383, 443, 503, 571, 641, 715, 793, 877, 965, 1063, 1163, 1267, 1373, 1483, 1595, 1723, 1853, 1991, 2129, 2279, 2429, 2587, 2749, 2917, 3089, 3269, 3449, 3641, 3833, 4031, 4229
Offset: 0

Views

Author

Altug Alkan, Sep 21 2015

Keywords

Comments

Sequence is interesting because of the fact that a(n) is a prime number for n = 0..20.
Main inspiration of sequence was indices of prime numbers in A036439 and A227547.

Examples

			a(0) = A007504(0) + A010693(0) = 0 + 2 = 2.
a(1) = A007504(1) + A010693(1) = 2 + 3 = 5.
a(2) = A007504(2) + A010693(2) = 5 + 2 = 7.
a(3) = A007504(3) + A010693(3) = 10 + 3 = 13.
a(4) = A007504(4) + A010693(4) = 17 + 2 = 19.
a(5) = A007504(5) + A010693(5) = 28 + 3 = 31.
		

Crossrefs

Programs

  • Mathematica
    s = Accumulate@ Prime@ Range@ 1200; {2}~Join~Table[s[[n]] + If[OddQ@ n, 3, 2], {n, 46}] (* Michael De Vlieger, Sep 21 2015 *)
  • PARI
    a(n) = sum(k=1, n, prime(k)) + (n%2) + 2;
    vector(50, n, a(n-1))

Formula

a(n) = Sum_{k=1..n} prime(k) + n mod 2 + 2 for n>0, a(0)=2 (from Pari code).