%I #18 Nov 08 2023 15:29:58
%S 1,1,1,1,0,1,1,1,1,1,1,0,0,0,1,1,1,2,2,1,1,1,0,0,0,0,0,1,1,1,1,2,2,1,
%T 1,1,1,0,1,0,1,0,1,0,1,1,1,0,1,2,2,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,
%U 3,7,8,8,6,4,3,2,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1
%N Triangle T(n,k) read by rows: the number of partitions of n into k parts which are divisors of n.
%H Alois P. Heinz, <a href="/A320638/b320638.txt">Rows n = 1..200, flattened</a>
%F T(n,n) = T(n,1) = 1, representing partitions into the trivial divisors.
%e The triangle starts
%e 1
%e 1 1
%e 1 0 1
%e 1 1 1 1
%e 1 0 0 0 1
%e 1 1 2 2 1 1
%e 1 0 0 0 0 0 1
%e 1 1 1 2 2 1 1 1
%e 1 0 1 0 1 0 1 0 1
%e 1 1 0 1 2 2 1 1 1 1
%e 1 0 0 0 0 0 0 0 0 0 1
%e 1 1 3 7 8 8 6 4 3 2 1 1
%e 1 0 0 0 0 0 0 0 0 0 0 0 1
%e 1 1 0 0 1 1 2 2 1 1 1 1 1 1
%e 1 0 1 0 3 0 3 0 2 0 2 0 1 0 1
%e 1 1 1 2 3 4 4 4 4 3 2 2 2 1 1 1
%e 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
%e 1 1 2 3 6 8 9 10 9 8 6 5 4 3 2 2 1 1
%e 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
%e 1 1 1 3 6 8 10 10 9 9 8 6 5 4 3 3 2 1 1 1
%e 1 0 1 0 1 0 3 0 3 0 2 0 2 0 2 0 1 0 1 0 1
%e 1 1 0 0 0 0 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1
%e 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
%e 1 1 3 9 20 33 44 50 51 48 42 36 29 23 18 14 11 8 6 4 3 2 1 1
%p A320638 := proc(n,noprts)
%p local a, p, w, el ;
%p a := 0 ;
%p for p in combinat[partition](n) do
%p if nops(p) = noprts then
%p w := true ;
%p for el in p do
%p if modp(n, el) <> 0 then
%p w := false;
%p break;
%p end if;
%p end do:
%p if w then
%p a := a+1 ;
%p end if;
%p end if ;
%p end do:
%p a ;
%p end proc:
%p seq(seq(A320638(n,k),k=1..n),n=1..13) ;
%p # second Maple program:
%p T:= proc(n) option remember; local b, l;
%p l, b:= numtheory[divisors](n),
%p proc(m, i) option remember; expand(`if`(m=0, 1,
%p `if`(i<1, 0, b(m, i-1)+`if`(l[i]>m, 0, x*b(m-l[i], i)))))
%p end; (p-> seq(coeff(p, x, i), i=1..n))(b(n, nops(l)))
%p end:
%p seq(T(n), n=1..20); # _Alois P. Heinz_, Nov 08 2023
%t T[n_, k_] := IntegerPartitions[n, {k}, Divisors[n]] // Length;
%t Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Nov 08 2023 *)
%Y Cf. A018818 (row sums), A008284.
%Y T(2n,n) gives A367189.
%K nonn,look,tabl
%O 1,18
%A _R. J. Mathar_, Oct 18 2018