login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of compositions of n such that the minimum part is equal to 1 and the first 1 occurs before any maximum part in the composition.
1

%I #14 May 01 2014 09:44:56

%S 0,0,0,1,3,7,16,34,73,152,318,657,1356,2784,5703,11647,23740,48290,

%T 98073,198887,402837,815032,1647424,3327112,6714352,13540995,27292175,

%U 54978561,110697947,222790629,448211668,901392243,1812185325,3642182184,7318157714

%N Number of compositions of n such that the minimum part is equal to 1 and the first 1 occurs before any maximum part in the composition.

%C We note that the definition implies that the maximum part of the composition must be strictly greater than 1.

%H Alois P. Heinz, <a href="/A238089/b238089.txt">Table of n, a(n) for n = 0..800</a>

%F a(n) = Sum_{i>=2} x^(i+1)/(1-Sum_{j=2..i-1} x^j)/(1 - Sum{k=1..i-1} x^k)/(1 - Sum_{m=1..i} x^m).

%F a(n) ~ 2^(n-1). - _Vaclav Kotesovec_, May 01 2014

%e a(5) = 7 because we have: 1+4, 1+1+3, 1+2+2, 1+3+1, 1+1+1+2, 1+1+2+1, 1+2+1+1.

%p b:= proc(n, t, m) option remember;

%p `if`(n=0, t, add(`if`(j=1 and m>1, b(n-1, 1, m),

%p `if`(j>=m, b(n-j, 0, j), b(n-j, t, m))), j=1..n))

%p end:

%p a:= n-> b(n, 0$2):

%p seq(a(n), n=0..45); # _Alois P. Heinz_, Feb 17 2014

%t nn=30;CoefficientList[Series[Sum[x^(i+1)/(1-Sum[x^j,{j,2,i-1}])/(1-Sum[x^k,{k,1,i-1}])/(1-Sum[x^m,{m,1,i}]),{i,2,nn}],{x,0,nn}],x]

%t (* or *)

%t Table[Length[Select[Level[Table[Select[Compositions[n,k],Count[#,0]==0&],{k,1,n}],{2}],Min[Position[#,1]]<Min[Position[#,Max[#]]]&]],{n,0,10}]

%K nonn

%O 0,5

%A _Geoffrey Critzer_, Feb 17 2014