OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..367 (terms 1..300 from Harvey P. Dale)
MATHEMATICA
w=9; Table[w; i=1; While[PrimeQ[ToExpression[StringJoin[ToString[i], ToString[w]]]]==False, i++ ]; w=ToExpression[StringJoin[ToString[i], ToString[w]]], {32}]
nxt[n_]:=Module[{c=10^IntegerLength[n], x=1}, While[!PrimeQ[c*x+n], x++]; c*x+n]; NestList[nxt, 19, 15] (* Harvey P. Dale, Sep 25 2013 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(an=19):
while True:
yield an
pow10 = 10**len(str(an))
for t in count(pow10+an, step=pow10):
if isprime(t):
an = t
break
print(list(islice(agen(), 17))) # Michael S. Branicky, Jun 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 27 2002
EXTENSIONS
More terms from Hans Havermann, Jun 06 2002
STATUS
approved