login
A069607
a(1) = 5; a(n) = smallest number such that the juxtaposition a(1)a(2)...a(n) is a prime.
21
5, 3, 23, 1, 3, 9, 21, 9, 21, 23, 43, 3, 23, 7, 21, 89, 37, 21, 137, 1, 119, 493, 143, 133, 483, 267, 179, 7, 333, 359, 439, 101, 33, 31, 533, 19, 63, 39, 333, 839, 63, 693, 423, 327, 73, 29, 39, 21, 517, 27, 99, 251, 7, 411, 243, 33, 149, 49, 227, 283, 303, 351, 303
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..610
EXAMPLE
a(5) = 3 and the number 532313 is a prime.
MATHEMATICA
a[1] = 5; 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 *)
PROG
(Python)
from sympy import isprime
def aupton(terms):
astr, alst = '5', [5]
for n in range(2, terms+1):
an = 1
while not isprime(int(astr + str(an))): an += 1
astr, alst = astr + str(an), alst + [an]
return alst
print(aupton(63)) # Michael S. Branicky, May 03 2021
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 26 2002
EXTENSIONS
More terms from Jason Earls, Jun 13 2002
STATUS
approved