OFFSET
0,4
COMMENTS
A composition with parts in standard order satisfies the condition that for any part p > 1, the part p - 1 has already appeared. All compositions of this kind have first part 1.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3333
FORMULA
G.f.: 1 + Sum_{i>0} x^(i*(i+1)/2) / Product_{j=1..i} 1 - (x - x^(j+1))/(1 - x).
EXAMPLE
a(6) = 9 counts: (1,1,1,1,1,1), (1,1,1,1,2), (1,1,1,2,1), (1,1,2,1,1), (1,2,1,1,1), (1,1,2,2), (1,2,1,2), (1,2,2,1), (1,2,3).
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, add(
b(n-j, max(i, j)), j=1..min(n, i+1)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..36); # Alois P. Heinz, May 08 2025
PROG
(PARI)
A_x(N) = {my(x='x+O('x^(N+1))); Vec(1 + sum(i=1, (N/2)+1, x^(i*(i+1)/2)/prod(j=1, i, 1 - (x-x^(j+1))/(1-x))))}
A_x(40)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, May 06 2025
STATUS
approved
