OFFSET
0,5
COMMENTS
Also the number of integer compositions of n such that replacing each run of repeated parts with a single part (run-compression) results in a composition of n-1.
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..1000
FORMULA
a(n>0) = A373949(n,n-1).
G.f.: x/((1-x)^2 * (1 - Sum_{i>0} (x^i/(1+x^i)))^2). - John Tyler Rascoe, Jul 02 2024
EXAMPLE
The a(0) = 0 through a(7) = 14 compositions:
. . (11) . (112) (113) (114) (115)
(211) (311) (411) (511)
(1121) (1131) (1123)
(1211) (1311) (1132)
(2112) (1141)
(1411)
(2113)
(2311)
(3112)
(3211)
(11212)
(12112)
(21121)
(21211)
MATHEMATICA
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n], Total[First/@Split[#]]==n-1&]], {n, 0, 10}]
PROG
(PARI)
A_x(N)={my(x='x+O('x^N), h=x/((1+x)^2*(1-sum(i=1, N, (x^i /(1+x^i))))^2)); concat([0, 0], Vec(h))}
A_x(40) \\ John Tyler Rascoe, Jul 02 2024
CROSSREFS
For any run (not just of ones) we have A003242.
Subdiagonal of A373949.
These compositions are ranked by A373956.
A003242 counts compressed compositions.
A114901 counts compositions with no isolated parts.
A333755 counts compositions by compressed length (number of runs).
A373948 represents the run-compression transformation.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 28 2024
EXTENSIONS
a(26) onwards from John Tyler Rascoe, Jul 02 2024
STATUS
approved