A301502 Number of compositions (ordered partitions) of n into triangular parts (A000217) such that no two adjacent parts are equal (Carlitz compositions).
1, 1, 0, 1, 2, 1, 1, 3, 3, 3, 7, 9, 6, 10, 20, 20, 20, 36, 50, 54, 75, 109, 126, 156, 233, 302, 352, 480, 676, 838, 1053, 1447, 1896, 2374, 3152, 4225, 5368, 6923, 9297, 12133, 15472, 20353, 26959, 34779, 45092, 59551, 77717, 100475, 131714, 172949, 224316, 291987, 383418
Offset: 0
Keywords
Examples
a(12) = 6 because we have [3, 6, 3], [3, 1, 3, 1, 3, 1], [1, 10, 1], [1, 6, 1, 3, 1], [1, 3, 1, 6, 1] and [1, 3, 1, 3, 1, 3].
Links
Programs
-
Mathematica
nmax = 52; CoefficientList[Series[1/(1 - Sum[x^(k (k + 1)/2)/(1 + x^(k (k + 1)/2)), {k, 1, nmax}]), {x, 0, nmax}], x]
Formula
G.f.: 1/(1 - Sum_{k>=1} x^(k*(k+1)/2)/(1 + x^(k*(k+1)/2))).
Comments