OFFSET
1,2
COMMENTS
Also, a(1) = 1 and for n > 1, a(n) is the smallest prime p such that the concatenation of the digits of A397341(n-1) and p is prime.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000
FORMULA
a(1) = 1 and for n > 1, a(n) = min {p prime : A397341(n)*10^d(p) + p is prime}, where d(p) is the number of decimal digits of p.
EXAMPLE
a(1) = 1.
a(2) = 3 since a(1)|3 = 1|3 = 13 is prime (and the concatenation 12 is not prime).
a(3) = 7 since a(1)|a(2)|7 = 13|7 = 137 is prime (and 132, 133 and 135 are not prime).
a(4) = 3 since a(1)|a(2)|a(3)|3 = 137|3 = 1373 is prime (and 1372 is not prime).
a(5) = 41 since a(1)|..|a(4)|41 = 1373|41 = 137341 is prime and no smaller prime p concatenated onto 1373 yields a prime.
MATHEMATICA
next[F_] := NestWhile[NextPrime, 2, ! PrimeQ[F*10^IntegerLength[#] + #] &];
F = 1; seq = {1};
Do[p = next[F]; AppendTo[seq, p]; F = F*10^IntegerLength[p] + p, {60}];
seq
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Md. Rad Sarar Anando, Jun 21 2026
STATUS
approved
