OFFSET
0,1
EXAMPLE
a(2)=2 because it is the first prime followed by 3,41,101,107,113,137,... all remaining primes when 11 is appended to each of them.
MAPLE
with(numtheory); for n from 1 to 100 do for i from 1 to 5000 do if isprime(ithprime(i)*10^n + sum(10^j, j=0..n-1)) then printf(`%d, `, ithprime(i)); break; fi: od:od: # James A. Sellers, Apr 09 2005
MATHEMATICA
f[n_] := Block[{k = 1, t = Table[1, {n}]}, While[id = IntegerDigits[ Prime[k]]; id[[ -1]] == 1 || !PrimeQ[ FromDigits[ Join[id, t]]], k++ ]; Prime[k]]; Table[ f[n], {n, 0, 62}] (* Robert G. Wilson v, Apr 09 2005 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Apr 08 2005
EXTENSIONS
More terms from Robert G. Wilson v and James A. Sellers, Apr 09 2005
STATUS
approved