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

%I #46 Sep 08 2022 08:45:08

%S 1,1,3,8,20,51,130,331,843,2147,5468,13926,35467,90328,230049,585893,

%T 1492163,3800268,9678592,24649615,62778090,159884387,407196479,

%U 1037055435,2641191736,6726635386,17131517943,43630863008,111119879345,283002139641,720755021635

%N Expansion of (1-x)/(1-2*x-x^2-x^3).

%C 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

%H G. C. Greubel, <a href="/A077997/b077997.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,1).

%F 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

%F 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

%F 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

%t 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 *)

%o (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 */

%o (PARI) Vec((1-x)/(1-2*x-x^2-x^3)+O(x^30)) \\ _Charles R Greathouse IV_, Sep 26 2012

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/( 1-2*x-x^2-x^3) )); // _G. C. Greubel_, Jun 27 2019

%o (Sage) ((1-x)/(1-2*x-x^2-x^3)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Jun 27 2019

%o (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

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, Nov 17 2002

%E Deleted certain dangerous or potentially dangerous links. - _N. J. A. Sloane_, Jan 30 2021

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)