A323345 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.
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, 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, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
There are 4 partitions of 150 such that the parts form an arithmetic progression with common difference of 9: 150 = 150 150 = 41 + 50 + 59 150 = 24 + 33 + 42 + 51 150 = 12 + 21 + 30 + 39 + 48 Then, T(150,9) = 4. Array begins: k 0 1 2 3 4 5 6 7 8 9 n +-------------------- 1 | 1 1 1 1 1 1 1 1 1 1 2 | 2 1 1 1 1 1 1 1 1 1 3 | 2 2 1 1 1 1 1 1 1 1 4 | 3 1 2 1 1 1 1 1 1 1 5 | 2 2 1 2 1 1 1 1 1 1 6 | 4 2 2 1 2 1 1 1 1 1 7 | 2 2 1 2 1 2 1 1 1 1 8 | 4 1 2 1 2 1 2 1 1 1 9 | 3 3 2 2 1 2 1 2 1 1 10 | 4 2 2 1 2 1 2 1 2 1
Programs
-
Mathematica
T[n_, k_] := Module[{c = 0, i = 1, x = n}, While[x >= 1, If[IntegerQ[x], c++]; i++; x = (i-1)*(x-k)/i]; c] A004736[n_] := Binomial[Floor[3/2 + Sqrt[2*n]], 2] - n + 1 A002260[n_] := n - Binomial[Floor[1/2 + Sqrt[2*n]], 2] a[n_] := T[A004736[n], A002260[n] - 1] Table[a[n], {n, 1, 91}] (* Second program: *) nmax = 14; 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[n_, k_] := col[k][[n]]; Table[T[n-k, k], {n, 1, nmax}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Nov 30 2020 *)
-
PARI
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 for(s=1,13,for(k=0,s-1,n=s-k;print1(T(n,k),", ")))
Formula
T(n, 0) = A000005(n), the number of divisors of n.
T(n, 1) = A001227(n), the number of odd divisors of n.
T(n, 2) = A038548(n), the number of divisors of n that are at most sqrt(n).
T(n, 3) = A117277(n).
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
Comments