The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 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: A308168 A193339 A049646 * A219044 A032507 A325462 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 December 4 02:40 EST 2021. Contains 349469 sequences. (Running on oeis4.)