login
a(n) = 2n - (largest prime < 2n-2).
6

%I #12 Jan 02 2015 16:00:14

%S 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,

%T 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,

%U 3,3,5,7,9,11,3,3,5,7,3,5,7,3,5,3,5,7,3,5,7,3,3,5

%N a(n) = 2n - (largest prime < 2n-2).

%H T. D. Noe, <a href="/A049613/b049613.txt">Table of n, a(n) for n=3..10000</a>

%F a(n) <= A002373(n). - _R. J. Mathar_, Mar 19 2008

%F a(n) = 2*n - A007917(2*n-2). - _Reinhard Zumkeller_, Jan 02 2015

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

%t Table[2n-NextPrime[2n-2,-1],{n,3,100}] (* _Harvey P. Dale_, Aug 16 2011 *)

%o (Haskell)

%o a049613 n = 2 * n - a007917 (2 * n - 2)

%o -- _Reinhard Zumkeller_, Jan 02 2015

%Y Cf. A049653, A049711, A049716, A049847.

%Y Cf. A002373, A020481, A007917.

%K nice,nonn,easy

%O 3,1

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