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 #32 Jun 09 2022 21:49:31
%S 9,91,913,9131,91311,913111,9131111,91311111,913111111,9131111111,
%T 91311111111,913111111113,9131111111131,91311111111311,
%U 913111111113111,9131111111131111,91311111111311111,913111111113111111,9131111111131111111,91311111111311111111
%N a(n) is the smallest composite number ending in 1, 3, 7, or 9 with n digits whose first n-1 digits are a(n-1).
%C Question: do only a finite number of terms end in a digit other than 1?
%C Question: is the sequence infinite?
%e 911 is not a(3) because 911 is prime.
%o (PARI) lista(nn) = {vi = [1, 3, 7, 9]; a = 9; print1(a, ", "); for (n=1, nn, ok = 0; for (i=1, #vi, if (!isprime(na = eval(concat(Str(a), Str(vi[i])))), ok = 1; break;);); if (!ok, print("end of sequence"); return();); a = na; print1(a, ", "););} \\ _Michel Marcus_, May 11 2014
%K nonn,base
%O 1,1
%A _J. Lowell_, May 10 2014
%E More terms from _Michel Marcus_, May 11 2014