login
A397342
a(1) = 1; for n > 1, a(n) is the smallest prime that concatenated with all previous terms of the sequence forms a prime.
2
1, 3, 7, 3, 41, 7, 23, 7, 89, 3, 139, 29, 643, 419, 43, 29, 37, 29, 79, 251, 1009, 1283, 61, 389, 79, 467, 409, 431, 3, 199, 1637, 313, 167, 1789, 881, 709, 263, 109, 1601, 787, 83, 727, 281, 19, 11, 373, 911, 223, 29, 619, 1451, 43, 5147, 367, 5471, 1483, 317, 1483, 521, 2671
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
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
Cf. A397341 (concatenation of these terms).
Cf. A051670, A379354, A380010 (same but with beginning with 2, 3 and 7, resp.).
Sequence in context: A125314 A213244 A050393 * A110778 A200129 A365729
KEYWORD
nonn,base
AUTHOR
STATUS
approved