This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A033556 a(n+1) = 2a(n) - {largest prime < a(n)}. 1
 3, 4, 5, 7, 9, 11, 15, 17, 21, 23, 27, 31, 33, 35, 39, 41, 45, 47, 51, 55, 57, 61, 63, 65, 69, 71, 75, 77, 81, 83, 87, 91, 93, 97, 105, 107, 111, 113, 117, 121, 129, 131, 135, 139, 141, 143, 147, 155, 159, 161, 165 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 FORMULA a(n+1) = 2*a(n) - A151799(a(n)). - Reinhard Zumkeller, Jul 26 2012 MATHEMATICA a[n_] := a[n] = 2*a[n-1] - NextPrime[ a[n-1], -1]; a[0] = 3; Table[ a[n], {n, 0, 50}] (* Jean-François Alcover, Sep 24 2012 *) NestList[2#-NextPrime[#, -1]&, 3, 50] (* Harvey P. Dale, Jul 19 2014 *) PROG (Haskell) a033556 n = a033556_list !! n a033556_list = iterate (\x -> 2*x - fromInteger (a151799 x)) 3 -- Reinhard Zumkeller, Jul 26 2012 (PARI) a(n) = if(n==0, 3, 2*a(n-1)-precprime(a(n-1)-1)) \\ Iain Fox, Oct 18 2017 (PARI) first(n) = my(res = vector(n)); res[1] = 3; for(i = 2, n, res[i] = 2 * res[i - 1] - precprime(res[i - 1] - 1)); res \\ David A. Corneth, Oct 18 2017 CROSSREFS Cf. A007917, A151799. Sequence in context: A096262 A193339 A049646 * A219044 A032507 A063950 Adjacent sequences:  A033553 A033554 A033555 * A033557 A033558 A033559 KEYWORD nonn,easy,nice AUTHOR armand turpel (armand_t(AT)yahoo.com) STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 19 17:21 EDT 2019. Contains 321330 sequences. (Running on oeis4.)