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.

A049716 a(n) = 2*n + 1 - prevprime(2*n + 1).

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 6, 2, 2, 4, 6, 2, 4, 2, 2, 4, 2, 4, 6, 2, 4, 6, 2, 2, 4, 6, 2, 4, 2, 2, 4, 6, 2, 4, 2, 4, 6, 2, 4, 6, 8, 2, 4, 2, 2, 4, 2, 2, 4, 2, 4, 6, 8, 10, 12, 14, 2, 4, 2, 4, 6, 2, 2, 4, 6, 8, 10, 2, 2, 4, 6, 2, 4, 6, 2, 4, 2, 4, 6, 2, 4, 6, 2, 2, 4
Offset: 1

Views

Author

Keywords

Examples

			n:     1  2  3  4  5  6  7  8 ...
2n+1:  3  5  7  9 11 13 15 17 ...
pp:    2  3  5  7  7 11 13 13 ...
diff:  1  2  2  2  4  2  2  4 ...
		

Crossrefs

Programs

  • Maple
    seq(2*n+1-prevprime(2*n+1), n=1..100); # Robert Israel, Jul 05 2018
  • Mathematica
    Table[2n+1-NextPrime[2n+1,-1],{n,100}] (* Harvey P. Dale, Sep 21 2013 *)
  • PARI
    a(n) = 2*n+1-precprime(2*n); \\ Michel Marcus, Jul 06 2018

Formula

a(n) = A049711(2*n+1). - R. J. Mathar, Oct 26 2015