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.

A049653 a(n) = 2*n - prevprime(2*n).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 3, 5, 1, 1, 3, 5, 1, 3, 1, 1, 3, 1, 3, 5, 1, 3, 5, 1, 1, 3, 5, 1, 3, 1, 1, 3, 5, 1, 3, 1, 3, 5, 1, 3, 5, 7, 1, 3, 1, 1, 3, 1, 1, 3, 1, 3, 5, 7, 9, 11, 13, 1, 3, 1, 3, 5, 1, 1, 3, 5, 7, 9, 1, 1, 3, 5, 1, 3, 5, 1, 3, 1, 3, 5, 1, 3, 5, 1, 1, 3, 5, 7
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [2*n - NthPrime(#PrimesUpTo(2*n)): n in [2..50]]; // G. C. Greubel, Dec 05 2017
    
  • Mathematica
    Table[2*n - NextPrime[2*n, -1], {n, 2, 50}] (* G. C. Greubel, Dec 05 2017 *)
  • PARI
    for(n=2,50, print1(2*n - precprime(2*n), ", ")) \\ G. C. Greubel, Dec 05 2017

Formula

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