The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A238159 Number of compositions of n with exactly one part equal to 1 or exactly one part equal to 2. 1
 0, 1, 1, 2, 5, 11, 15, 35, 70, 124, 234, 447, 827, 1529, 2834, 5222, 9587, 17573, 32137, 58641, 106821, 194280, 352824, 639913, 1159238, 2097759, 3792375, 6849778, 12361822, 22292405, 40172089, 72344671, 130203409, 234200988, 421037335, 756538955, 1358728300 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..1000 FORMULA G.f.: x*A(x)^2 + x^2*B(x)^2 - 2*x^3*C(x)^3 where A(x)=1/(1 - (x/(1-x)-x)), B(x)=1/(1 - (x/(1-x)-x^2)), C(x)=1/(1 - (x/(1-x)-x-x^2)). a(n) ~ c * n / (2^(n-1) * d^n), where c = 0.02749202171174083217... is the root of the equation -1 + 18*c + 552*c^2 + 4232*c^3 = 0 and d = 0.2849201454990266329... is the root of the equation -1 + 4*d - 4*d^2 + 8*d^3 = 0. - Vaclav Kotesovec, May 01 2014 EXAMPLE a(4) = 5 because we have: 1+3, 3+1, 1+1+2, 1+2+1, 2+1+1. MATHEMATICA nn=30; a=1/(1-(x/(1-x)-x)); b=1/(1-(x/(1-x)-x^2)); c=1/(1-(x/(1-x)-x-x^2)); CoefficientList[Series[a^2x +b^2x^2-2 c^3x^3, {x, 0, nn}], x] (* or *) Table[Length[Select[Level[Table[Select[Compositions[n, k], Count[#, 0]==0&], {k, 1, n}], {2}], Count[#, 1]==1||Count[#, 2]==1&]], {n, 0, 10}] CROSSREFS Cf. A006367 exactly one part equal to 1, A079662 exactly one part equal to 2 (with appropriate offset). Sequence in context: A026228 A003420 A206602 * A080156 A082083 A287558 Adjacent sequences:  A238156 A238157 A238158 * A238160 A238161 A238162 KEYWORD nonn AUTHOR Geoffrey Critzer, Feb 18 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 23 01:30 EST 2020. Contains 331166 sequences. (Running on oeis4.)