A256067 Irregular table T(n,k): the number of partitions of n where the least common multiple of all parts equals k.
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 0, 0, 1, 0, 1, 1, 4, 2, 4, 1, 5, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 4, 3, 4, 1, 7, 1, 1, 1, 2, 0, 2, 0, 1, 1, 0, 0, 0, 0, 1, 1, 5, 3, 6, 2, 9, 1, 2, 1, 3, 0, 4, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 3, 6, 2
Offset: 0
Examples
The 5 partitions of n=4 are 1+1+1+1 (lcm=1), 1+1+2 (lcm=2), 2+2 (lcm=2), 1+3 (lcm=3) and 4 (lcm=4). So k=1, 3 and 4 appear once, k=2 appears twice. The triangle starts: 1 ; 1 ; 1 1; 1 1 1; 1 2 1 1; 1 2 1 1 1 1; 1 3 2 2 1 2; 1 3 2 2 1 3 1 0 0 1 0 1; ...
Links
- Alois P. Heinz, Rows n = 0..30, flattened
Crossrefs
Programs
-
Maple
A256067 := proc(n,k) local a,p ; a := 0 ; for p in combinat[partition](n) do ilcm(op(p)) ; if % = k then a := a+1 ; end if; end do: a; end proc: # second Maple program: b:= proc(n, i) option remember; `if`(n=0 or i=1, x, b(n, i-1)+(p-> add(coeff(p, x, t)*x^ilcm(t, i), t=1..degree(p)))(add(b(n-i*j, i-1), j=1..n/i))) end: T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)): seq(T(n), n=0..12); # Alois P. Heinz, Mar 27 2015
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x, b[n, i-1] + Function[{p}, Sum[ Coefficient[p, x, t]*x^LCM[t, i], {t, 1, Exponent[p, x]}]][Sum[b[n-i*j, i-1], {j, 1, n/i}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 22 2015, after Alois P. Heinz *)
Extensions
T(0,1)=1 prepended by Alois P. Heinz, Mar 27 2015