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) = 7; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.
12

%I #17 Jan 21 2024 20:51:49

%S 7,9,19,27,47,57,61,81,179,211,251,273,373,477,581,753,847,909,909,

%T 939,957,1173,1311,1343,1543,1619,1693,1739,1879,1971,2141,2523,2653,

%U 2729,2863,3201,3293,3411,3621,3753,5023,5421,5459,5481,6403,6827,7041,7669

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

%C All terms must be odd. - _Harvey P. Dale_, Oct 21 2023

%H Robert Israel, <a href="/A046257/b046257.txt">Table of n, a(n) for n = 1..512</a>

%p A:= 7: x:= 7: count:= 1:

%p for i from 7 by 2 while count < 10000 do

%p while isprime(x*10^(1+ilog10(i))+i) do

%p x:= x*10^(1+ilog10(i))+i; A:= A,i; count:= count+1;

%p od od:

%p A; # _Robert Israel_, Jan 21 2024

%t 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 *)

%t 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 *)

%Y Cf. A069609, A074343, A033680, A033679, A033681, A046254, A046255, A046256, A046258, A046259, A111524.

%K nonn

%O 1,1

%A _Patrick De Geest_, May 15 1998