This site is supported by donations to The OEIS Foundation. Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A079062 a(1) = 2; for n>1, a(n) = smallest prime p such that p - a(n-1) = a^b for some positive integers a,b > 1. 2
 2, 11, 19, 23, 31, 47, 79, 83, 211, 227, 263, 271, 307, 311, 347, 379, 383, 419, 547, 563, 571, 587, 619, 683, 691, 727, 743, 751, 787, 823, 827, 859, 863, 991, 1091 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS T. D. Noe, Table of n, a(n) for n=1..1000 EXAMPLE Start with 2. 2 + 3^2 = 11 is a prime and there is no smaller such prime, so 11 is the next number. 11 + 2^3 = 19 is a prime and there is no smaller such prime, so 19 comes next, etc. MATHEMATICA a = 2; a[n_] := a[n] = Catch[ For[p = NextPrime[a[n-1]], True, p = NextPrime[p], q = p - a[n-1]; test = Catch[ Do[ If[q == a^b, Throw[True]], {a, 2, Ceiling[Sqrt[q]]}, {b, 2, Ceiling[Log[2, q]]}]]; If[test === True, Throw[p]]]]; Table[a[n], {n, 1, 35}] (* Jean-François Alcover, Jul 13 2012 *) PROG (Haskell) a079062 n = a079062_list !! (n-1) a079062_list = 2 : f 2 (tail a000040_list) where    f x ps = q : f q qs where      (q:qs) = dropWhile (\p -> a075802 (p - x) == 0 || p - x == 1) ps -- Reinhard Zumkeller, Jun 14 2013 CROSSREFS Cf. A075802, A000040. Sequence in context: A023173 A018443 A163058 * A038930 A019375 A078784 Adjacent sequences:  A079059 A079060 A079061 * A079063 A079064 A079065 KEYWORD nice,nonn AUTHOR Fabian Rothelius, Feb 02 2003 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 10 15:09 EST 2019. Contains 329896 sequences. (Running on oeis4.)