|
|
A048552
|
|
a(n+1) is next smallest prime beginning with a(n), initial prime is a(0) = 7.
|
|
5
|
|
|
7, 71, 719, 7193, 71933, 719333, 71933317, 719333177, 71933317711, 7193331771103, 71933317711039, 7193331771103939, 719333177110393913, 7193331771103939133, 719333177110393913323, 71933317711039391332309, 719333177110393913323097, 719333177110393913323097047
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
MAPLE
|
f:= proc(n) option remember; local q, d, v;
q:=procname(n-1);
for d from 1 do
v:= nextprime(q*10^d);
if v < (q+1)*10^d then return v fi
od
end proc:
f(0):= 7:
|
|
MATHEMATICA
|
Nest[Function[{a, n}, Append[#, Catch@ Do[Do[If[PrimeQ@ #, Throw@ #; Break[], #] &@ FromDigits[n~Join~PadLeft[IntegerDigits[(5 j - 4 + Mod[3 j + 2, 4])/2], i]], {j, 4*10^(i - 1)}], {i, Infinity}]]] @@ {#, IntegerDigits[#[[-1]] ]} &, {7}, 17] (* Michael De Vlieger, Jan 26 2020 *)
|
|
PROG
|
(PARI)
next_A048552(p)=for(i=1, oo, my(q=nextprime(p*=10)); q-p>10^i||return(q))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|