A331919 Number of compositions (ordered partitions) of n into distinct tetrahedral numbers.
1, 1, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 2, 6, 0, 0, 0, 0, 1, 2, 0, 0, 2, 6, 0, 0, 0, 0, 2, 6, 0, 0, 6, 25, 2, 0, 0, 2, 6, 0, 0, 0, 0, 2, 6, 0, 0, 6, 24, 0, 0, 0, 0, 2, 7, 2, 0, 6, 26, 6, 0, 0, 0, 6, 26, 6, 0, 24, 126, 24, 0, 0, 0, 0, 2, 6, 0, 0, 6, 24, 0, 0, 1, 2, 6, 24, 2, 6, 24
Offset: 0
Examples
a(15) = 6 because we have [10, 4, 1], [10, 1, 4], [4, 10, 1], [4, 1, 10], [1, 10, 4] and [1, 4, 10].
Links
Programs
-
Maple
N:= 200: # for a(0)..a(N) G:= mul(1+t*x^(i*(i+1)*(i+2)/6), i=1..floor((6*N)^(1/3))): F:= proc(n) local R, k, v; R:= coeff(G, x, n); add(k!*coeff(R, t, k), k=1..degree(R, t)) end proc: F(0):= 1: map(F, [$0..N]); # Robert Israel, Feb 03 2020
-
Mathematica
M = 100; G = Product[1 + t x^(i(i+1)(i+2)/6), {i, 1, Floor[(6M)^(1/3)]}]; F[n_] := Module[{R, k, v}, R = Coefficient[G, x, n]; Sum[k! Coefficient[R, t, k], {k, 1, Exponent[R, t]}]]; F[0] = 1; F /@ Range[0, M] (* Jean-François Alcover, Jun 20 2020, after Robert Israel *)