OFFSET
1,1
COMMENTS
Row n ends when a composite number is found.
EXAMPLE
for k = 1..6, a(608, k) = { 6089, 60899, 608999,6089999,60899999,608999999}
are in the sequence.
19,199,1999;
29;
0;
0;
59,599;
0;
79;
89;
0;
109;
0;
0;
139,1399,13999,139999,1399999;
149,1499;
MAPLE
with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
while (id=0) do:a1:=a0*10+9:if type(a1, prime)=true then a0:=a1:printf(`%d, `, a0):c:=c+1:else
id:=1:fi:od:if c=0 then printf(`%d, `, 0):else fi:od:
MATHEMATICA
Reap[Do[cnt = 0; d = IntegerDigits[n]; While[p = FromDigits[AppendTo[d, 9]]; PrimeQ[p], cnt++; Sow[p]]; If[cnt == 0, Sow[0]], {n, 61}]][[2, 1]]
CROSSREFS
KEYWORD
nonn,base,tabf,less
AUTHOR
Michel Lagneau, Feb 10 2011
STATUS
approved