A069610 a(1) = 8; a(n) = smallest number such that the juxtaposition a(1)a(2)...a(n) is a prime.
8, 3, 9, 11, 7, 21, 23, 3, 7, 29, 3, 99, 9, 93, 1, 39, 33, 21, 137, 123, 57, 13, 191, 3, 163, 9, 143, 63, 21, 157, 521, 163, 161, 43, 161, 109, 107, 121, 423, 57, 71, 7, 173, 469, 107, 57, 177, 411, 49, 149, 61, 291, 413, 271, 299, 693, 349, 149, 73, 299, 271, 521
Offset: 1
Examples
a(4) = 11 and the number 83911 is a prime.
Crossrefs
Programs
-
Mathematica
a[1] = 8; a[n_] := a[n] = Block[{k = 1, c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 63}] (* Robert G. Wilson v, Aug 05 2005 *)
-
Python
from sympy import isprime def aupton(terms): alst, astr = [8], '8' for n in range(2, terms+1): an = 1 while not isprime(int(astr + str(an))): an += 2 alst, astr = alst + [an], astr + str(an) return alst print(aupton(62)) # Michael S. Branicky, Aug 03 2021
Extensions
More terms from Jason Earls, Jun 13 2002