login
Triangle read by rows: T(n,k) gives number of partitions of k, (k=1..n) into the prime factors of n, for n>=1.
2

%I #20 Oct 28 2021 18:41:22

%S 0,0,1,0,0,1,0,1,0,1,0,0,0,0,1,0,1,1,1,1,2,0,0,0,0,0,0,1,0,1,0,1,0,1,

%T 0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,1,0,1,

%U 1,1,1,2,1,2,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,2

%N Triangle read by rows: T(n,k) gives number of partitions of k, (k=1..n) into the prime factors of n, for n>=1.

%C T(n,n) equals A066882(n).

%H Alois P. Heinz, <a href="/A107329/b107329.txt">rows n = 1..200, flattened</a>

%F T(n,k) is coefficient of x^k in 1/Product(1-x^p_i) with p_i the prime factors of n.

%e T(30,12)=5 counting [2,2,2,2,2,2], [2,2,2,3,3], [3,3,3,3], [2,2,3,5] and [2,5,5].

%e Triangle begins:

%e {0},

%e {0, 1},

%e {0, 0, 1},

%e {0, 1, 0, 1},

%e {0, 0, 0, 0, 1},

%e {0, 1, 1, 1, 1, 2},

%e {0, 0, 0, 0, 0, 0, 1},

%e {0, 1, 0, 1, 0, 1, 0, 1},

%e {0, 0, 1, 0, 0, 1, 0, 0, 1},

%e ...

%p with(numtheory):

%p T:= proc(n) local b, l; l:= sort([factorset(n)[]]):

%p b:= proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0,

%p b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))

%p end; forget(b):

%p seq(b(k, nops(l)), k=1..n)

%p end:

%p seq(T(n), n=1..20); # _Alois P. Heinz_, Oct 28 2021

%t Table[Rest@CoefficientList[Series[1/Times @@ ((1-x^#)& /@ (First /@ FactorInteger[n])), {x, 0, n}], x], {n, 2, 24}]

%Y Cf. A066882.

%Y Row sums +1 give A092976.

%K easy,nonn,look,tabl

%O 1,21

%A _Wouter Meeussen_, May 22 2005

%E T(1,1) = 0 prepended by _Michel Marcus_, Oct 28 2021