login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077997 Expansion of (1-x)/(1-2*x-x^2-x^3). 3
1, 1, 3, 8, 20, 51, 130, 331, 843, 2147, 5468, 13926, 35467, 90328, 230049, 585893, 1492163, 3800268, 9678592, 24649615, 62778090, 159884387, 407196479, 1037055435, 2641191736, 6726635386, 17131517943, 43630863008, 111119879345, 283002139641, 720755021635 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Number of compositions of n where there is one sort of part 1, two sorts of part 2, and three sorts of every other part. - Joerg Arndt, Mar 15 2014
LINKS
FORMULA
a(n) = 2*a(n-1) + a(n-2) + a(n-3), n>2, with a(0)=1, a(1)=1, a(2)=3. - Philippe Deléham, Nov 20 2008
If p[1]=1, p[2]=2, p[i]=3, (i>2), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, May 02 2010
a(n) = Sum_{m=1..n} Sum_{i=0..n-m} binomial(m+i-1,m-1)*Sum_{j=0..m} binomial(j,n-3*m+2*j-i)*binomial(m,j), n>0, a(0)=1. - Vladimir Kruchinin, May 12 2011
MATHEMATICA
CoefficientList[Series[(1-x)/(1-2x-x^2-x^3), {x, 0, 30}], x] (* or *) LinearRecurrence[{2, 1, 1}, {1, 1, 3}, 30] (* Harvey P. Dale, May 24 2011 *)
PROG
(Maxima) a(n):=sum(sum(binomial(m+i-1, m-1) * sum(binomial(j, n-3*m+2*j-i) * binomial(m, j), j, 0, m), i, 0, n-m), m, 1, n); /* Vladimir Kruchinin, May 12 2011 */
(PARI) Vec((1-x)/(1-2*x-x^2-x^3)+O(x^30)) \\ Charles R Greathouse IV, Sep 26 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/( 1-2*x-x^2-x^3) )); // G. C. Greubel, Jun 27 2019
(Sage) ((1-x)/(1-2*x-x^2-x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
(GAP) a:=[1, 1, 3];; for n in [4..30] do a[n]:=2*a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jun 27 2019
CROSSREFS
Sequence in context: A101893 A140662 A174198 * A294407 A295346 A027220
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
EXTENSIONS
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 17:37 EDT 2024. Contains 372139 sequences. (Running on oeis4.)