[go: up one dir, main page]

login
A046257
a(1) = 7; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.
12
7, 9, 19, 27, 47, 57, 61, 81, 179, 211, 251, 273, 373, 477, 581, 753, 847, 909, 909, 939, 957, 1173, 1311, 1343, 1543, 1619, 1693, 1739, 1879, 1971, 2141, 2523, 2653, 2729, 2863, 3201, 3293, 3411, 3621, 3753, 5023, 5421, 5459, 5481, 6403, 6827, 7041, 7669
OFFSET
1,1
COMMENTS
All terms must be odd. - Harvey P. Dale, Oct 21 2023
LINKS
MAPLE
A:= 7: x:= 7: count:= 1:
for i from 7 by 2 while count < 10000 do
while isprime(x*10^(1+ilog10(i))+i) do
x:= x*10^(1+ilog10(i))+i; A:= A, i; count:= count+1;
od od:
A; # Robert Israel, Jan 21 2024
MATHEMATICA
a[1] = 7; a[n_] := a[n] = Block[{k = a[n - 1], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 46}] (* Robert G. Wilson v, Aug 05 2005 *)
nxt[{j_, a_}]:=Module[{k=a}, While[CompositeQ[j*10^IntegerLength[k]+k], k+=2]; {j*10^IntegerLength[k]+k, k}]]; NestList[nxt, {7, 7}, 50][[;; , 2]] (* Harvey P. Dale, Oct 21 2023 *)
KEYWORD
nonn
AUTHOR
Patrick De Geest, May 15 1998
STATUS
approved