OFFSET
1,1
COMMENTS
Add digits to p (starting with a nonzero digit) until another prime is reached.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(p) local d, x;
for d from 1 do
x:= nextprime(10^d*p+10^(d-1)-1);
if x < 10^d*(p+1) then return x fi
od
end proc:
map(f @ ithprime, [$1..100]); # Robert Israel, Aug 12 2018
MATHEMATICA
f[n_] := Block[{k = 1, p = Prime@ n}, While[a = 10^Floor[1 + Log10@ k] p + k; !PrimeQ@ a, k += 2]; a]; Array[f, 44]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved