login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(1) = 8; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.
12

%I #16 Apr 10 2024 15:27:10

%S 8,9,23,51,69,81,93,129,169,179,181,273,321,321,449,639,769,857,1047,

%T 1213,1233,1443,1587,1637,1953,2433,2599,2639,2901,3261,3681,4059,

%U 5109,5169,5407,5691,6149,6531,7939,8081,8211,8439,8589,8623,8663,8757,9459

%N a(1) = 8; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.

%H Robert Israel, <a href="/A046258/b046258.txt">Table of n, a(n) for n = 1..400</a>

%p A[1]:= 8: A[2]:= 9: x:= 89:

%p for n from 3 to 100 do

%p for y from A[n-1] by 2 do

%p z:= x*10^(1+ilog10(y))+y;

%p if isprime(z) then break fi;

%p od:

%p A[n]:= y;

%p x:= z;

%p od:

%p seq(A[i],i=1..100); # _Robert Israel_, May 30 2018

%t a[1] = 8; 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 ++ ]; k]; Table[ a[n], {n, 47}] (* _Robert G. Wilson v_, Aug 05 2005 *)

%t nxt[{jp_,a_}]:=Module[{k=a},While[CompositeQ[jp 10^IntegerLength[k]+k],k++];{jp 10^IntegerLength[k]+ k,k}]; NestList[nxt,{8,8},50][[;;,2]] (* _Harvey P. Dale_, Apr 10 2024 *)

%Y Cf. A069610, A074344, A033680, A033679, A033681, A046254, A046255, A046256, A046257, A046259, A111524.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, May 15 1998