login
A389742
Number of integer compositions of n whose 0-prepended first differences are not all equal.
11
0, 0, 1, 2, 7, 15, 29, 63, 127, 254, 510, 1023, 2045, 4095, 8191, 16381, 32767, 65535, 131069, 262143, 524286, 1048573, 2097151, 4194303, 8388605, 16777215
OFFSET
0,4
FORMULA
a(n) = 2^(n-1) - A007862(n) for n > 0.
EXAMPLE
The composition c = (1,2,3) has 0-prepended first differences (1,1,1), which are all equal, so c is not counted under a(6).
The a(0) = 0 through a(5) = 15 compositions:
. . (1,1) (2,1) (1,3) (1,4)
(1,1,1) (2,2) (2,3)
(3,1) (3,2)
(1,1,2) (4,1)
(1,2,1) (1,1,3)
(2,1,1) (1,2,2)
(1,1,1,1) (1,3,1)
(2,1,2)
(2,2,1)
(3,1,1)
(1,1,1,2)
(1,1,2,1)
(1,2,1,1)
(2,1,1,1)
(1,1,1,1,1)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !SameQ@@Differences[Prepend[#, 0]]&]], {n, 0, 15}]
CROSSREFS
The complement is counted by A007862, ranks A389732.
These compositions have ranks A389736.
The non 0-prepended version is A389741, ranks A389735.
For distinct instead of equal differences we have A389744, ranks A389738.
The complement for equal differences is A389601, ranks A389734.
A011782 counts compositions.
A066099 lists compositions in standard order.
A175342 counts arithmetic progressions, ranks A389731, subsets A051336.
A389743 counts compositions without distinct differences, ranks A389598.
A389811 counts partitions without equal differences, ranks A389812.
Sequence in context: A289965 A290620 A290628 * A192962 A294539 A343531
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Oct 16 2025
STATUS
approved