%I #12 Mar 30 2012 18:35:54
%S 19,199,1999,29,0,0,59,599,0,79,89,0,109,0,0,139,1399,13999,139999,
%T 1399999,149,1499,0,0,179,0,199,1999,0,0,229,239,2399,0,0,269,2699,0,
%U 0,0,0,0,0,0,349,3499,359,0,379,389,0,409,4099,419,0,439,449,0,0,479,4799,0,499,4999,49999,509,5099,0,0,0,0,0,569,0,0,599,0,619
%N Irregular triangle, read by rows, of primes with prefix n and digits "9" appended, otherwise 0.
%C Row n ends when a composite number is found.
%e for k = 1..6, a(608, k) = { 6089, 60899, 608999,6089999,60899999,608999999}
%e are in the sequence.
%e 19,199,1999;
%e 29;
%e 0;
%e 0;
%e 59,599;
%e 0;
%e 79;
%e 89;
%e 0;
%e 109;
%e 0;
%e 0;
%e 139,1399,13999,139999,1399999;
%e 149,1499;
%p with(numtheory): for n from 1 to 100 do:a0:=n:id:=0:c:=0:for k from 1 to 20
%p while (id=0) do:a1:=a0*10+9:if type(a1,prime)=true then a0:=a1:printf(`%d, `,a0):c:=c+1:else
%p id:=1:fi:od:if c=0 then printf(`%d, `,0):else fi:od:
%t 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]]
%Y Cf. A185682, A185684, A185685.
%K nonn,base,tabf,less
%O 1,1
%A _Michel Lagneau_, Feb 10 2011