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”).
%I #13 Oct 06 2023 18:12:57
%S 4,1,9,11,19,3,3,41,51,51,87,19,63,23,13,29,3,219,183,27,27,3,3,27,
%T 217,129,381,59,163,281,169,57,77,31,9,9,243,147,21,239,39,219,693,37,
%U 143,789,9,163,219,497,51,301,149,103,117,309,591,159,741,131,541,1377,207
%N a(1) = 4; a(n) = smallest number such that the juxtaposition a(1)a(2)...a(n) is a prime.
%e a(5) = 19 and the number 4191119 is a prime.
%t a[1] = 4; 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 *)
%t nxt[{jxt_,a_}]:=Module[{n=1},While[CompositeQ[jxt*10^IntegerLength[n]+n],n++];{jxt*10^IntegerLength[ n]+n,n}]; NestList[nxt,{4,4},70][[;;,2]] (* _Harvey P. Dale_, Oct 06 2023 *)
%Y Cf. A069602, A069604, A046254, A074340, A092528, A069603, A069605, A069606, A069607, A069608, A069609, A069610, A069611, A111525.
%K nonn,base
%O 1,1
%A _Amarnath Murthy_, Mar 26 2002
%E More terms from _Jason Earls_, Jun 13 2002