OFFSET
1,1
COMMENTS
All terms must be odd. - Harvey P. Dale, Oct 21 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..512
MAPLE
A:= 7: x:= 7: count:= 1:
for i from 7 by 2 while count < 10000 do
while isprime(x*10^(1+ilog10(i))+i) do
x:= x*10^(1+ilog10(i))+i; A:= A, i; count:= count+1;
od od:
A; # Robert Israel, Jan 21 2024
MATHEMATICA
a[1] = 7; a[n_] := a[n] = Block[{k = a[n - 1], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 46}] (* Robert G. Wilson v, Aug 05 2005 *)
nxt[{j_, a_}]:=Module[{k=a}, While[CompositeQ[j*10^IntegerLength[k]+k], k+=2]; {j*10^IntegerLength[k]+k, k}]]; NestList[nxt, {7, 7}, 50][[;; , 2]] (* Harvey P. Dale, Oct 21 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, May 15 1998
STATUS
approved