%I #115 Sep 09 2022 04:25:18
%S 1,1,2,3,5,8,14,24,43,77,140,256,472,874,1628,3045,5719,10780,20388,
%T 38674,73562,140268,268066,513350,984911,1892875,3643570,7023562,
%U 13557020,26200182,50691978,98182666,190353370,369393466,717457656,1394632365,2713061899
%N Number of compositions of the integer n in which the first part is >= the other parts.
%C Essentially the same as A007059: a(n) = A007059(n+1).
%C In lunar arithmetic in base 2, this is the number of lunar divisors of the number 111...1 (with n 1's). E.g., 1111 has a(4) = 5 divisors (see A048888). - _N. J. A. Sloane_, Feb 23 2011.
%C First differences of A186537. - _N. J. A. Sloane_, Feb 23 2011
%C Number of balanced ordered rooted trees with n non-root nodes (see A048816 for unordered balanced trees); see example. The compositions are obtained from the level sequences by identifying a length-k run of (non-root) levels [t, t+1, t+2, ..., t+k-1] with a part k. - _Joerg Arndt_, Jul 20 2014
%D Arnold Knopfmacher and Neville Robbins, Compositions with parts constrained by the leading summand, Ars Combin. 76 (2005), 287-295.
%H Alois P. Heinz, <a href="/A079500/b079500.txt">Table of n, a(n) for n = 0..2000</a> (first 400 terms from T. D. Noe)
%H D. Applegate, M. LeBrun and N. J. A. Sloane, <a href="http://arxiv.org/abs/1107.1130">Dismal Arithmetic</a>, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
%H D. Applegate, M. LeBrun, N. J. A. Sloane, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Sloane/carry2.html">Dismal Arithmetic</a>, J. Int. Seq. 14 (2011) # 11.9.8.
%H Srecko Brlek, Andrea Frosini, Simone Rinaldi, and Laurent Vuillon, <a href="https://doi.org/10.37236/1041">Tilings by translation: enumeration by a rational language approach</a>, The Electronic Journal of Combinatorics, vol.13, (2006).
%H A. Frosini and S. Rinaldi, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Frosini/fros2.html">On the Sequence A079500 and Its Combinatorial Interpretations</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.3.1.
%H R. Kemp, <a href="http://dx.doi.org/10.1002/rsa.3240050111">Balanced ordered trees</a>, Random Structures Algorithms, 5 (1994), pp. 99-121.
%H <a href="/index/Di#dismal">Index entries for sequences related to dismal (or lunar) arithmetic</a>
%F G.f.: (1-z) * Sum_{k>=0} z^k/(1 - 2*z + z^(k+1)).
%F a(n) = A048888(n) - 1.
%F This is a subsequence of A067399: a(n) = A067399(2^n-1).
%F G.f.: -((1 + x^2 + 1/(x-1))/x)*( 1 + x*(x-1)^3*(1-x+x^3)/( Q(0) - x*(x-1)^3*(1-x+x^3)) ), where Q(k) = (x+1)*(2*x-1)*(1-x)^2 + x^(k+2)*(x+x^2+x^3-2*x^4-1 - x^(k+3) + x^(k+5)) - x*(-1+2*x-x^(k+3))*(1-2*x+x^2+x^(k+4)-x^(k+5))*(-1+4*x-5*x^2+2*x^3 - x^(k+2)- x^(k+5) + 2*x^(k+3) - x^(2*k+5) + x^(2*k+6))/Q(k+1) ; (continued fraction). - _Sergei N. Gladkovskii_, Dec 14 2013
%F a(n) = Sum_{j=1..n} F(j, n+1-j), where F(n,k) is the n-th k-generalized Fibonacci number A092921(k,n). - _Gregory L. Simay_, Aug 21 2022
%e From _Joerg Arndt_, Dec 29 2012: (Start)
%e There are a(7)=24 compositions p(1)+p(2)+...+p(m)=7 such that p(k) <= p(1):
%e [ 1] [ 1 1 1 1 1 1 1 ]
%e [ 2] [ 2 1 1 1 1 1 ]
%e [ 3] [ 2 1 1 1 2 ]
%e [ 4] [ 2 1 1 2 1 ]
%e [ 5] [ 2 1 2 1 1 ]
%e [ 6] [ 2 1 2 2 ]
%e [ 7] [ 2 2 1 1 1 ]
%e [ 8] [ 2 2 1 2 ]
%e [ 9] [ 2 2 2 1 ]
%e [10] [ 3 1 1 1 1 ]
%e [11] [ 3 1 1 2 ]
%e [12] [ 3 1 2 1 ]
%e [13] [ 3 1 3 ]
%e [14] [ 3 2 1 1 ]
%e [15] [ 3 2 2 ]
%e [16] [ 3 3 1 ]
%e [17] [ 4 1 1 1 ]
%e [18] [ 4 1 2 ]
%e [19] [ 4 2 1 ]
%e [20] [ 4 3 ]
%e [21] [ 5 1 1 ]
%e [22] [ 5 2 ]
%e [23] [ 6 1 ]
%e [24] [ 7 ]
%e (End)
%e From _Joerg Arndt_, Jul 20 2014: (Start)
%e The a(7) = 24 balanced ordered rooted trees with 7 non-root nodes are, as level sequences (of the pre-order walk):
%e 01: [ 0 1 1 1 1 1 1 1 ]
%e 02: [ 0 1 2 1 2 1 2 2 ]
%e 03: [ 0 1 2 1 2 2 1 2 ]
%e 04: [ 0 1 2 1 2 2 2 2 ]
%e 05: [ 0 1 2 2 1 2 1 2 ]
%e 06: [ 0 1 2 2 1 2 2 2 ]
%e 07: [ 0 1 2 2 2 1 2 2 ]
%e 08: [ 0 1 2 2 2 2 1 2 ]
%e 09: [ 0 1 2 2 2 2 2 2 ]
%e 10: [ 0 1 2 3 1 2 3 3 ]
%e 11: [ 0 1 2 3 2 3 2 3 ]
%e 12: [ 0 1 2 3 2 3 3 3 ]
%e 13: [ 0 1 2 3 3 1 2 3 ]
%e 14: [ 0 1 2 3 3 2 3 3 ]
%e 15: [ 0 1 2 3 3 3 2 3 ]
%e 16: [ 0 1 2 3 3 3 3 3 ]
%e 17: [ 0 1 2 3 4 2 3 4 ]
%e 18: [ 0 1 2 3 4 3 4 4 ]
%e 19: [ 0 1 2 3 4 4 3 4 ]
%e 20: [ 0 1 2 3 4 4 4 4 ]
%e 21: [ 0 1 2 3 4 5 4 5 ]
%e 22: [ 0 1 2 3 4 5 5 5 ]
%e 23: [ 0 1 2 3 4 5 6 6 ]
%e 24: [ 0 1 2 3 4 5 6 7 ]
%e (End)
%e From _Gus Wiseman_, Oct 07 2018: (Start)
%e The a(0) = 1 through a(6) = 14 balanced rooted plane trees:
%e o (o) (oo) (ooo) (oooo) (ooooo) (oooooo)
%e ((o)) ((oo)) ((ooo)) ((oooo)) ((ooooo))
%e (((o))) (((oo))) (((ooo))) (((oooo)))
%e ((o)(o)) ((o)(oo)) ((o)(ooo))
%e ((((o)))) ((oo)(o)) ((oo)(oo))
%e ((((oo)))) ((ooo)(o))
%e (((o)(o))) ((((ooo))))
%e (((((o))))) (((o)(oo)))
%e (((oo)(o)))
%e ((o)(o)(o))
%e (((((oo)))))
%e ((((o)(o))))
%e (((o))((o)))
%e ((((((o))))))
%e (End)
%p M:=101:
%p t1:=add( (1-x)*x^k/(1-2*x+x^k), k=1..M):
%p series(t1,x,M-1);
%p seriestolist(%);
%p # second Maple program:
%p b:= proc(n, m) option remember; `if`(n=0, 1,
%p `if`(m=0, add(b(n-j, j), j=1..n),
%p add(b(n-j, min(n-j, m)), j=1..min(n, m))))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=0..40); # _Alois P. Heinz_, May 01 2014
%t nn=36;CoefficientList[Series[Sum[x^i/(1-(x-x^(i+1))/(1-x)),{i,0,nn}],{x,0,nn}],x] (* _Geoffrey Critzer_, Mar 12 2013 *)
%t b[n_, m_] := b[n, m] = If[n==0, 1, If[m==0, Sum[b[n-j, j], {j, 1, n}], Sum[ b[n-j, Min[n-j, m]], {j, 1, Min[n, m]}]]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Nov 23 2015, after _Alois P. Heinz_ *)
%Y Cf. A188541.
%Y Cf. A000081 A000311, A001678, A120803, A320154, A320160, A316624, A320169.
%Y Cf. A092921.
%K nonn
%O 0,3
%A _Arnold Knopfmacher_, Jan 21 2003
%E Offset corrected by _N. J. A. Sloane_, Feb 23 2011
%E More terms from _N. J. A. Sloane_, Feb 24 2011
%E Further edits (required in order to clarify the definition - is the first part >= the rest. or only > the rest? Answer: the former; for the latter, see A007059) by _N. J. A. Sloane_, May 08 2011