%I #13 Jan 12 2026 04:30:46
%S 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,
%T 341,422,576,712,969,1197,1624,2006,2713,3352,4520,5586,7513,9286,
%U 12462,15403,20632,25500,34099,42143,56267,69540,92713,114585,152567,188563
%N Number of integer compositions of n that are the first sums of some composition with all parts > 1.
%C The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
%C 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.
%H Christian Sievers, <a href="/A391235/b391235.txt">Table of n, a(n) for n = 1..1000</a>
%F 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
%e The composition (5,4) is the first sums of (3,2,2) so is counted under a(9).
%e The a(7) = 1 through a(14) = 13 compositions:
%e (7) (8) (9) (10) (11) (12) (13) (14)
%e (4,4) (4,5) (4,6) (4,7) (4,8) (4,9) (5,9)
%e (5,4) (5,5) (5,6) (5,7) (5,8) (6,8)
%e (6,4) (6,5) (6,6) (6,7) (7,7)
%e (7,4) (7,5) (7,6) (8,6)
%e (8,4) (8,5) (9,5)
%e (4,4,4) (9,4) (10,4)
%e (4,4,5) (4,10)
%e (5,4,4) (4,4,6)
%e (4,5,5)
%e (5,4,5)
%e (5,5,4)
%e (6,4,4)
%t pas[y_,k_]:=Table[(-1)^j*k+Sum[(-1)^(i+j)*y[[i]],{i,j}],{j,0,Length[y]}];
%t nag[m_]:=Select[Table[pas[m,b],{b,1,Max[m]}],Min@@#>1&]!={};
%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],nag]],{n,10}]
%o (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
%Y These compositions are ranked A391626.
%Y The complement is counted by A391641.
%Y Allowing 1's gives A391683, ranks A390676 (union of A390568).
%Y A011782 counts compositions.
%Y A357213 counts compositions by sum of first sums.
%Y A390673 ranks compositions with distinct first sums, count A390567.
%Y A390678 = A022340 /\ A390677 ranks compositions with no 1's that are not first sums.
%Y A390745 ranks compositions that are uniquely first sums, count A391644.
%Y Cf. A008965, A070211, A342527, A390432, A390446, A390447, A390448, A390675, A391642, A391680, A391983.
%K nonn,easy
%O 1,8
%A _Gus Wiseman_, Jan 06 2026
%E a(31) onward from _Christian Sievers_, Jan 09 2026