%I #16 Mar 03 2024 03:58:49
%S 1,1,1,2,2,3,4,6,8,12,18,27,40,61,93,142,217,333,512,789,1217,1881,
%T 2912,4514,7007,10893,16956,26427,41238,64426,100767,157778,247301,
%U 388007,609351,957836,1506928,2372763,3739035,5896462,9305388,14695124,23221657,36718116,58092690,91961034
%N Compositions (ordered partitions) of n into odd parts where the first part must be a maximal part.
%H Alois P. Heinz, <a href="/A368746/b368746.txt">Table of n, a(n) for n = 0..4801</a>
%F G.f.: 1 + Sum_{n>=1} x^(2*n-1)/(1 - Sum_{k=1..n} x^(2*k-1) ).
%e The a(10) = 18 such compositions are:
%e 1: [ 1 1 1 1 1 1 1 1 1 1 ]
%e 2: [ 3 1 1 1 1 1 1 1 ]
%e 3: [ 3 1 1 1 1 3 ]
%e 4: [ 3 1 1 1 3 1 ]
%e 5: [ 3 1 1 3 1 1 ]
%e 6: [ 3 1 3 1 1 1 ]
%e 7: [ 3 1 3 3 ]
%e 8: [ 3 3 1 1 1 1 ]
%e 9: [ 3 3 1 3 ]
%e 10: [ 3 3 3 1 ]
%e 11: [ 5 1 1 1 1 1 ]
%e 12: [ 5 1 1 3 ]
%e 13: [ 5 1 3 1 ]
%e 14: [ 5 3 1 1 ]
%e 15: [ 5 5 ]
%e 16: [ 7 1 1 1 ]
%e 17: [ 7 3 ]
%e 18: [ 9 1 ]
%p b:= proc(n, m) option remember; `if`(n=0, 1, `if`(m=0,
%p add(b(n-2*j+1, 2*j-1), j=1..(n+1)/2), add(
%p b(n-2*j+1, min(n-2*j+1, m)), j=1..(min(n, m)+1)/2)))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..45); # _Alois P. Heinz_, Jan 04 2024
%t b[n_, m_] := b[n, m] = If[n == 0, 1, If[m == 0,
%t Sum[b[n - 2j + 1, 2j - 1], {j, 1, (n + 1)/2}], Sum[
%t b[n - 2j + 1, Min[n - 2j + 1, m]], {j, 1, (Min[n, m] + 1)/2}]]];
%t a[n_] := b[n, 0];
%t Table[a[n], {n, 0, 45}] (* _Jean-François Alcover_, Mar 03 2024, after _Alois P. Heinz_ *)
%o (PARI) my(N=44, x='x+O('x^N)); Vec(1+sum(n=1, N, x^(2*n-1)/(1-sum(k=1, n, x^(2*k-1)))))
%Y Cf. A079500.
%K nonn
%O 0,4
%A _Joerg Arndt_, Jan 04 2024