login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A373950
Number of integer compositions of n containing two adjacent ones and no other runs.
5
0, 0, 1, 0, 2, 4, 5, 14, 26, 46, 92, 176, 323, 610, 1145, 2108, 3912, 7240, 13289, 24418, 44778, 81814, 149356, 272222, 495144, 899554, 1632176, 2957332, 5352495, 9677266, 17477761, 31536288, 56852495, 102403134, 184302331, 331452440, 595659234, 1069742760
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
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.
A116861 counts partitions by compressed sum, by compressed length A116608.
A333755 counts compositions by compressed length (number of runs).
A373948 represents the run-compression transformation.
Sequence in context: A121410 A002959 A306919 * A295031 A178436 A370959
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 28 2024
EXTENSIONS
a(26) onwards from John Tyler Rascoe, Jul 02 2024
STATUS
approved