[go: up one dir, main page]

login
A069603
a(1) = 2; a(n) = smallest number such that the juxtaposition a(1)a(2)...a(n) is a prime.
15
2, 3, 3, 3, 3, 21, 17, 3, 13, 99, 17, 3, 7, 77, 19, 119, 7, 33, 29, 49, 149, 43, 23, 99, 9, 31, 57, 93, 29, 21, 91, 59, 31, 39, 87, 11, 121, 231, 279, 269, 51, 21, 313, 297, 527, 309, 27, 21, 67, 63, 431, 231, 13, 99, 407, 453, 69, 409, 189, 11, 31, 21, 23, 19, 93, 1143
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000 (terms 1..100 from Zak Seidov)
EXAMPLE
a(6) = 21 and the number 2333321 is a prime.
MATHEMATICA
a[1] = 2; 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, 67}] (* Robert G. Wilson v, Aug 05 2005 *)
PROG
(Python)
from gmpy2 import is_prime
from itertools import count, islice
def agen(): # generator of terms
an, s = 2, "2"
while True:
yield an
an = next(k for k in count(3, 2) if is_prime(int(s+str(k))))
s += str(an)
print(list(islice(agen(), 66))) # Michael S. Branicky, May 11 2023
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 26 2002
EXTENSIONS
More terms from Jason Earls, Jun 13 2002
STATUS
approved