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.

A049613 a(n) = 2n - (largest prime < 2n-2).

Original entry on oeis.org

3, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 9, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 9, 11, 13, 15, 3, 5, 3, 5, 7, 3, 3, 5, 7, 9, 11, 3, 3, 5, 7, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5
Offset: 3

Views

Author

David M. Elder (elddm(AT)rhodes.edu)

Keywords

Examples

			a(14)=28 - (largest prime < 26) = 28 - 23 = 5.
		

Crossrefs

Programs

  • Haskell
    a049613 n = 2 * n - a007917 (2 * n - 2)
    -- Reinhard Zumkeller, Jan 02 2015
  • Mathematica
    Table[2n-NextPrime[2n-2,-1],{n,3,100}] (* Harvey P. Dale, Aug 16 2011 *)

Formula

a(n) <= A002373(n). - R. J. Mathar, Mar 19 2008
a(n) = 2*n - A007917(2*n-2). - Reinhard Zumkeller, Jan 02 2015