|
|
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, 1123, 1187, 1223, 1231, 1427, 1459, 1523, 1531, 1567, 1571, 1579, 1583, 1619, 1627, 1663, 1667
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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[1] = 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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|