A373950 Number of integer compositions of n containing two adjacent ones and no other runs.
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
Keywords
Examples
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)
Links
- John Tyler Rascoe, Table of n, a(n) for n = 0..1000
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.
Programs
-
Mathematica
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n], Total[First/@Split[#]]==n-1&]],{n,0,10}]
-
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
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
Extensions
a(26) onwards from John Tyler Rascoe, Jul 02 2024
Comments