%I #23 Oct 21 2024 06:33:40
%S 1,2,1,2,1,1,3,2,1,1,2,1,1,1,1,4,2,2,1,1,1,2,2,1,1,1,1,1,4,2,2,2,1,1,
%T 1,1,3,1,1,1,1,1,1,1,1,4,3,2,2,2,1,1,1,1,1,2,2,2,1,1,1,1,1,1,1,1,6,2,
%U 2,2,2,2,1,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1
%N Square array read by ascending antidiagonals: T(n, k) is the number of partitions of n where parts, if sorted in ascending order, form an arithmetic progression (AP) with common difference of k; n >= 1, k >= 0.
%C T(n, k) is the number of positive integers in the sequence defined, for all i >= 1, by x_1 = n and x_i = (i-1)*(x_(i-1)-k)/i; or defined equivalently by x_i=n/i-(k/2)*(i-1). An x_i positive and integer characterizes the AP-partition with smallest part x_i and number of parts i.
%C T(n, k) is the number of i, positive integers, such that n - P(k+2,i) is both nonnegative and divisible by i, where P(r,i) denotes the i-th r-gonal number (see A057145).
%F T(n, 0) = A000005(n), the number of divisors of n.
%F T(n, 1) = A001227(n), the number of odd divisors of n.
%F T(n, 2) = A038548(n), the number of divisors of n that are at most sqrt(n).
%F T(n, 3) = A117277(n).
%F The g.f. for column d is Sum_{k>=1} x^(k*(d*k-d+2)/2)/(1-x^k) [information taken from A117277]. - _Joerg Arndt_, May 05 2020
%e There are 4 partitions of 150 such that the parts form an arithmetic progression with common difference of 9:
%e 150 = 150
%e 150 = 41 + 50 + 59
%e 150 = 24 + 33 + 42 + 51
%e 150 = 12 + 21 + 30 + 39 + 48
%e Then, T(150,9) = 4.
%e Array begins:
%e k 0 1 2 3 4 5 6 7 8 9
%e n +--------------------
%e 1 | 1 1 1 1 1 1 1 1 1 1
%e 2 | 2 1 1 1 1 1 1 1 1 1
%e 3 | 2 2 1 1 1 1 1 1 1 1
%e 4 | 3 1 2 1 1 1 1 1 1 1
%e 5 | 2 2 1 2 1 1 1 1 1 1
%e 6 | 4 2 2 1 2 1 1 1 1 1
%e 7 | 2 2 1 2 1 2 1 1 1 1
%e 8 | 4 1 2 1 2 1 2 1 1 1
%e 9 | 3 3 2 2 1 2 1 2 1 1
%e 10 | 4 2 2 1 2 1 2 1 2 1
%t T[n_, k_] :=
%t Module[{c = 0, i = 1, x = n},
%t While[x >= 1, If[IntegerQ[x], c++]; i++; x = (i-1)*(x-k)/i]; c]
%t A004736[n_] := Binomial[Floor[3/2 + Sqrt[2*n]], 2] - n + 1
%t A002260[n_] := n - Binomial[Floor[1/2 + Sqrt[2*n]], 2]
%t a[n_] := T[A004736[n], A002260[n] - 1]
%t Table[a[n], {n, 1, 91}]
%t (* Second program: *)
%t nmax = 14;
%t col[k_] := col[k] = CoefficientList[Sum[x^(n(k n - k + 2)/2 - 1)/(1 - x^n), {n, 1, nmax}] + O[x]^nmax, x];
%t T[n_, k_] := col[k][[n]];
%t Table[T[n-k, k], {n, 1, nmax}, {k, 0, n-1}] // Flatten (* _Jean-François Alcover_, Nov 30 2020 *)
%o (PARI)
%o T(n,k)=c=0;i=1;x=n;while(x>=1,if(frac(x)==0,c++);i++;x=n/i-(k/2)*(i-1));c
%o for(s=1,13,for(k=0,s-1,n=s-k;print1(T(n,k),", ")))
%Y Cf. A000005, A001227, A038548, A117277, A334461, A334541, A334948.
%Y Cf. A057145.
%K nonn,tabl,changed
%O 1,2
%A _Luc Rousseau_, Jan 11 2019