login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A059512
For n>=2, the number of (s(0), s(1), ..., s(n-1)) such that 0 < s(i) < 5 and |s(i) - s(i-1)| <= 1 for i = 1,2,....,n-1, s(0) = 2, s(n-1) = 2.
4
0, 1, 1, 3, 7, 18, 46, 119, 309, 805, 2101, 5490, 14356, 37557, 98281, 257231, 673323, 1762594, 4614226, 12079707, 31624285, 82792161, 216750601, 567457058, 1485616392, 3889385353, 10182528721, 26658183099, 69791991919
OFFSET
0,4
COMMENTS
Substituting x(1-x)/(1-2x) into x/(1-x^2) yields g.f. of sequence.
FORMULA
a(n) = 2a(n-1) + Sum{m<n-1}a(m) - F(n-3) where F(n) is the n-th Fibonacci number (A000045).
G.f.: x(1-x)(1-2x)/((1-x-x^2)(1-3x+x^2)).
a(n+1)=sum{k=0..floor(n/2), C(n,2k)*F(2k+1)}. [From Paul Barry, Oct 14 2009]
MATHEMATICA
CoefficientList[Series[x(1-x)(1-2x)/((1-x-x^2)(1-3x+x^2)), {x, 0, 30}], x] (* Harvey P. Dale, Apr 23 2011 *)
PROG
(PARI) a(n)=(fibonacci(2*n-1)+fibonacci(n-2))/2
CROSSREFS
a(1-2n)=A005207(2n), a(-2n)=A056014(2n+1).
Sequence in context: A078058 A116413 A052960 * A094297 A026107 A372033
KEYWORD
easy,nonn
AUTHOR
Floor van Lamoen, Jan 21 2001
STATUS
approved

  NODES
COMMUNITY 1
INTERN 1