A074341 a(1) = 4; a(n) is smallest number > a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.
4, 7, 9, 11, 81, 87, 109, 117, 123, 129, 201, 389, 429, 441, 771, 811, 831, 1037, 1143, 1299, 1569, 1581, 1803, 1837, 1943, 2053, 2171, 2379, 2431, 3201, 3437, 3489, 3723, 3841, 4289, 4801, 5523, 6249, 7083, 7467, 7749, 8171, 9073, 9333, 9683, 9781, 10833
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..100
Crossrefs
Programs
-
Mathematica
a[1] = 4; a[n_] := a[n] = Block[{k = a[n - 1] + 1 + Mod[a[n - 1], 2], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 47}] (* Robert G. Wilson v *) nxt[{j_,a_}]:=Module[{k=a+1},While[!PrimeQ[j*10^IntegerLength[k]+k],k++];{j*10^IntegerLength[k]+k,k}]; NestList[nxt,{4,4},50][[;;,2]] (* Harvey P. Dale, Apr 07 2025 *)
Extensions
More terms from Robert G. Wilson v, Aug 05 2005