login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A049613
a(n) = 2n - (largest prime < 2n-2).
6
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,1
FORMULA
a(n) <= A002373(n). - R. J. Mathar, Mar 19 2008
a(n) = 2*n - A007917(2*n-2). - Reinhard Zumkeller, Jan 02 2015
EXAMPLE
a(14)=28 - (largest prime < 26) = 28 - 23 = 5.
MATHEMATICA
Table[2n-NextPrime[2n-2, -1], {n, 3, 100}] (* Harvey P. Dale, Aug 16 2011 *)
PROG
(Haskell)
a049613 n = 2 * n - a007917 (2 * n - 2)
-- Reinhard Zumkeller, Jan 02 2015
CROSSREFS
KEYWORD
nice,nonn,easy
AUTHOR
David M. Elder (elddm(AT)rhodes.edu)
STATUS
approved