login
A391235
Number of integer compositions of n that are the first sums of some composition with all parts > 1.
12
0, 0, 0, 1, 1, 1, 1, 2, 3, 4, 5, 7, 9, 13, 16, 23, 28, 40, 49, 69, 85, 118, 146, 201, 249, 341, 422, 576, 712, 969, 1197, 1624, 2006, 2713, 3352, 4520, 5586, 7513, 9286, 12462, 15403, 20632, 25500, 34099, 42143, 56267, 69540, 92713, 114585, 152567, 188563
OFFSET
1,8
COMMENTS
The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
Also the number of integer compositions of n whose k-based partial alternating sums are all > 1 for some integer k. Here, the k-based partial alternating sums of a sequence q are given by pas(q,k)_j = (-1)^j * k + Sum_{i=1..j} (-1)^(i+j) * q_i. This is a signed version of the partial sums transformation, inverse to the "first sums" transformation.
LINKS
FORMULA
G.f.: (x^4+x^5-x^6-x^7)/(1-2*x^2-x^5+x^6+x^7+x^9). - Christian Sievers, Jan 11 2026
EXAMPLE
The composition (5,4) is the first sums of (3,2,2) so is counted under a(9).
The a(7) = 1 through a(14) = 13 compositions:
(7) (8) (9) (10) (11) (12) (13) (14)
(4,4) (4,5) (4,6) (4,7) (4,8) (4,9) (5,9)
(5,4) (5,5) (5,6) (5,7) (5,8) (6,8)
(6,4) (6,5) (6,6) (6,7) (7,7)
(7,4) (7,5) (7,6) (8,6)
(8,4) (8,5) (9,5)
(4,4,4) (9,4) (10,4)
(4,4,5) (4,10)
(5,4,4) (4,4,6)
(4,5,5)
(5,4,5)
(5,5,4)
(6,4,4)
MATHEMATICA
pas[y_, k_]:=Table[(-1)^j*k+Sum[(-1)^(i+j)*y[[i]], {i, j}], {j, 0, Length[y]}];
nag[m_]:=Select[Table[pas[m, b], {b, 1, Max[m]}], Min@@#>1&]!={};
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], nag]], {n, 10}]
PROG
(PARI) a(n)=polcoef((x^4+x^5-x^6-x^7)/(1-2*x^2-x^5+x^6+x^7+x^9)+O(x*x^n), n) \\ Christian Sievers, Jan 11 2026
CROSSREFS
These compositions are ranked A391626.
The complement is counted by A391641.
Allowing 1's gives A391683, ranks A390676 (union of A390568).
A011782 counts compositions.
A357213 counts compositions by sum of first sums.
A390673 ranks compositions with distinct first sums, count A390567.
A390678 = A022340 /\ A390677 ranks compositions with no 1's that are not first sums.
A390745 ranks compositions that are uniquely first sums, count A391644.
Sequence in context: A280451 A240178 A039863 * A036802 A333265 A055167
KEYWORD
nonn,easy
AUTHOR
Gus Wiseman, Jan 06 2026
EXTENSIONS
a(31) onward from Christian Sievers, Jan 09 2026
STATUS
approved