%I #27 Aug 19 2021 15:08:35
%S 1,1,1,1,2,1,3,1,4,1,4,1,1,5,1,1,6,1,1,7,1,1,7,2,1,8,2,1,8,3,1,9,3,1,
%T 9,4,1,9,5,1,10,5,1,11,5,1,11,6,1,12,6,1,12,7,1,12,8,1,12,9,1,13,9,1,
%U 13,10,1,14,10,1,14,11,1,15,11,1,15,12,1,16,12
%N Irregular triangle T(n,m) read by rows (n >= 1, 0 <= m <= Max(A001221([1..n]))), giving the number of integers in [1,n] with m distinct prime factors.
%C A346617 is a similar triangle, except that the first column (corresponding to m = 0) has been omitted.
%H Michel Marcus and David A. Corneth, <a href="/A285577/b285577.txt">Table of n, a(n) for n = 1..20001</a> (first 5062 rows flattened, first 806 terms from Michel Marcus)
%F See A346617 for the asymptotic distribution of the rows. - _N. J. A. Sloane_, Aug 19 2021
%e First few rows are:
%e 1;
%e 1, 1;
%e 1, 2;
%e 1, 3;
%e 1, 4;
%e 1, 4, 1;
%e 1, 5, 1;
%e 1, 6, 1;
%e 1, 7, 1;
%e 1, 7, 2;
%e 1, 8, 2;
%e ...
%p omega := proc(n) nops(numtheory[factorset](n)) end proc: # # A001221
%p A:=Array(0..20,0);
%p ans:=[];
%p mx:=0;
%p for n from 1 to 20 do
%p k:=omega(n);
%p if k>mx then mx:=k; fi;
%p A[k]:=A[k]+1;
%p ans:=[op(ans),[seq(A[i],i=0..mx)]];
%p od:
%p ans; # _N. J. A. Sloane_, Aug 19 2021
%t With[{nn = 29}, Function[s, Array[Function[t, Count[t, #] & /@ Range[0, Max@ t]]@ Take[s, #] &, nn]]@ PrimeNu@ Range@ nn] // Flatten (* _Michael De Vlieger_, Apr 23 2017 *)
%o (PARI) tabf(nn) = {for (n=1, nn, vo = vector(n, k, omega(k)); for (k=0, vecmax(vo), print1(#select(x->x==k, vo), ", ");); print(););}
%o (PARI) upto(n) = {my(res = [1], v=[1], i=2); while(#res<n, o = omega(i)+1; if(o>#v, v=concat(v,[1]), v[o]++); res=concat(res,v); i++); res} \\ _David A. Corneth_, Apr 22 2017
%Y Cf. A001221, A146289, A346617.
%K nonn,tabf
%O 1,5
%A _Michel Marcus_, Apr 22 2017