%I #22 Nov 13 2016 12:36:09
%S 1,1,2,3,8,1,2,3,4,5,8,9,15,24,80,1,2,3,4,5,6,7,8,9,14,15,20,24,27,35,
%T 48,49,63,80,125,224,2400,4374,1,2,3,4,5,6,7,8,9,10,11,14,15,20,21,24,
%U 27,32,35,44,48,49,54,55,63,80,98,99,120,125,175,224,242,384,440,539
%N Irregular triangle read by rows: row n consists of all numbers x such that x and x+1 have no prime factor larger than prime(n).
%C A number x is p-smooth if all prime factors of x are <= p. The length of row n is A002071(n). Row n begins with 1 and ends with A002072(n). Each term of row n-1 is in row n.
%C The n-th row is the union of the rows 1 to n of A145605. - _M. F. Hasler_, Jan 18 2015
%D See A002071.
%H T. D. Noe, <a href="/A138180/b138180.txt">Rows n=1..10 of triangle, flattened</a>
%e The table reads:
%e 1,
%e 1, 2, 3, 8,
%e 1, 2, 3, 4, 5, 8, 9, 15, 24, 80, (= A085152)
%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 20, 24, 27, 35, 48, 49, 63, 80, 125, 224, 2400, 4374, (= A085153)
%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 20, 21, 24, 27, 32, 35, 44, 48, 49, 54, 55, 63, 80, 98, 99, 120, 125, 175, 224, 242, 384, 440, 539, 2400, 3024, 4374, 9800 (= A252494),
%e ...
%t (* This program needs x maxima taken from A002072. *) xMaxima = A002072; smoothNumbers[p_, max_] := Module[{a, aa, k, pp, iter}, k = PrimePi[p]; aa = Array[a, k]; pp = Prime[Range[k]]; iter = Table[{a[j], 0, PowerExpand @ Log[pp[[j]], max/Times @@ (Take[pp, j-1]^Take[aa, j-1])]}, {j, 1, k}]; Table[Times @@ (pp^aa), Sequence @@ iter // Evaluate] // Flatten // Sort]; row[n_] := Module[{sn}, sn = smoothNumbers[Prime[n], xMaxima[[n]]+1]; Reap[Do[If[sn[[i]]+1 == sn[[i+1]], Sow[sn[[i]]]], {i, 1, Length[sn]-1}]][[2, 1]]]; Table[Print[n]; row[n], {n, 1, 10}] // Flatten (* _Jean-François Alcover_, Jan 16 2015, updated Nov 10 2016 *)
%o (PARI) A138180_row=[]; A138180(n,k)={if(k, A138180(n)[k], #A138180_row<n && A138180_row=concat(A138180_row,vector(n)); if(#A138180_row[n], A138180_row[n], k=0; p=prime(n); A138180_row[n]=vector(A002071(n),i, until( vecmax(factor(k++)[, 1])<=p && vecmax(factor(k--+(k<2))[, 1])<=p,k++); k)))} \\ A138180(n) (w/o 2nd arg. k) returns the whole row. - _M. F. Hasler_, Jan 16 2015
%Y Cf. A145605; A085152, A085153, A252494, A252493, A252492.
%K nonn,tabf
%O 1,3
%A _T. D. Noe_, Mar 04 2008