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
Christian Sievers, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,easy
AUTHOR
Gus Wiseman, Jan 06 2026
EXTENSIONS
a(31) onward from Christian Sievers, Jan 09 2026
STATUS
approved
