A301500 Number of compositions (ordered partitions) of n into squarefree parts (A005117) such that no two adjacent parts are equal (Carlitz compositions).
1, 1, 1, 3, 3, 5, 11, 15, 25, 45, 69, 115, 193, 309, 513, 849, 1387, 2291, 3771, 6189, 10195, 16773, 27579, 45391, 74675, 122837, 202111, 332507, 547011, 899949, 1480583, 2435803, 4007361, 6592863, 10846405, 17844319, 29357197, 48297813, 79458705, 130724101, 215064673
Offset: 0
Keywords
Examples
a(5) = 5 because we have [5], [3, 2], [2, 3], [2, 1, 2] and [1, 3, 1].
Programs
-
Mathematica
nmax = 40; CoefficientList[Series[1/(1 - Sum[MoebiusMu[k]^2 x^k/(1 + x^k), {k, 1, nmax}]), {x, 0, nmax}], x]
Formula
G.f.: 1/(1 - Sum_{k>=1} mu(k)^2*x^k/(1 + x^k)), where mu() is the Moebius function (A008683).