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!)
A008999 a(n) = 2*a(n-1) + a(n-4). 11
1, 2, 4, 8, 17, 36, 76, 160, 337, 710, 1496, 3152, 6641, 13992, 29480, 62112, 130865, 275722, 580924, 1223960, 2578785, 5433292, 11447508, 24118976, 50816737, 107066766, 225581040, 475281056, 1001378849 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Milan Janjic, Binomial Coefficients and Enumeration of Restricted Words, Journal of Integer Sequences, 2016, Vol 19, #16.7.3.
Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv:1406.3081 [math.CO], 2014
FORMULA
G.f.: 1/(1-2*x-x^4). - Philippe Deléham, Dec 02 2006
a(n) = Sum_{m=0..n} Sum_{j=0..(n-m)/3} binomial(n-m+(-3)*j,j)*binomial(n-3*j,m). - Vladimir Kruchinin, May 23 2011
O.g.f.: exp( Sum {n>=1} ( (1 + sqrt(1 + x^2))^n + (1 - sqrt(1 + x^2))^n ) * x^n/n ). Cf. A008998. - Peter Bala, Dec 22 2014
MAPLE
A008999 := proc(n) option remember; if n <= 3 then 2^n else 2*A008999(n-1)+A008999(n-4); fi; end;
MATHEMATICA
LinearRecurrence[{2, 0, 0, 1}, {1, 2, 4, 8}, 40] (* Harvey P. Dale, May 09 2012 *)
CoefficientList[Series[1/(1-2x-x^4), {x, 0, 40}], x] (* Vincenzo Librandi, May 09 2012 *)
PROG
(Maxima) a(n):=sum(sum(binomial(n-m+(-3)*j, j)*binomial(n-3*j, m), j, 0, (n-m)/3), m, 0, n); /* Vladimir Kruchinin, May 23 2011 */
(Magma) I:=[1, 2, 4, 8]; [n le 4 select I[n] else 2*Self(n-1)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, May 09 2012
(PARI) my(x='x+O('x^40)); Vec(1/(1-2*x-x^4)) \\ G. C. Greubel, Jun 12 2019
(Sage) (1/(1-2*x-x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
(GAP) a:=[1, 2, 4, 8];; for n in [5..40] do a[n]:=2*a[n-1]+a[n-4]; od; a; # G. C. Greubel, Jun 12 2019
CROSSREFS
Cf. A008998.
Sequence in context: A202843 A247297 A292322 * A052903 A308745 A367714
KEYWORD
nonn,easy
AUTHOR
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 August 9 19:29 EDT 2024. Contains 375044 sequences. (Running on oeis4.)