OFFSET
1,2
COMMENTS
The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
A nonnegative sequence is not unique in having its first sums iff every other of its terms is at least 1. - Christian Sievers, Jan 09 2026
LINKS
Christian Sievers, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: (x+x^2-x^3-x^4)/(1-x-3*x^2+2*x^3+2*x^4). - Christian Sievers, Jan 11 2026
EXAMPLE
The composition (1,2,1) is the first sums of (0,1,1,0) only, so (1,2,1) is not counted under a(4).
The composition (2,1,2) is the first sums of both (1,1,0,2) and (2,0,1,1), so (2,1,2) is counted under a(5).
The a(1) = 1 through a(5) = 13 compositions:
(1) (2) (3) (4) (5)
(1,1) (1,2) (1,3) (1,4)
(2,1) (2,2) (2,3)
(1,1,1) (3,1) (3,2)
(1,1,2) (4,1)
(2,1,1) (1,1,3)
(1,1,1,1) (1,2,2)
(2,1,2)
(2,2,1)
(3,1,1)
(1,1,1,2)
(2,1,1,1)
(1,1,1,1,1)
MATHEMATICA
pas[y_, k_]:=Table[(-1)^j*k+Sum[(-1)^(i+j)*y[[i]], {i, j}], {j, 0, Length[y]}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Length[Select[Table[pas[#, b], {b, 0, Max[#]}], Min@@#>=0&]]>1&]], {n, 1, 10}]
PROG
(PARI) a(n)=polcoef((x+x^2-x^3-x^4)/(1-x-3*x^2+2*x^3+2*x^4)+O(x*x^n), n) \\ Christian Sievers, Jan 11 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gus Wiseman, Jan 08 2026
EXTENSIONS
a(21) onward from Christian Sievers, Jan 11 2026
STATUS
approved
