cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A059512 #11 Mar 02 2015 16:08:45
%S A059512 0,1,1,3,7,18,46,119,309,805,2101,5490,14356,37557,98281,257231,
%T A059512 673323,1762594,4614226,12079707,31624285,82792161,216750601,
%U A059512 567457058,1485616392,3889385353,10182528721,26658183099,69791991919
%N 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.
%C A059512 Substituting x(1-x)/(1-2x) into x/(1-x^2) yields g.f. of sequence.
%F A059512 a(n) = 2a(n-1) + Sum{m<n-1}a(m) - F(n-3) where F(n) is the n-th Fibonacci number (A000045).
%F A059512 G.f.: x(1-x)(1-2x)/((1-x-x^2)(1-3x+x^2)).
%F A059512 a(n+1)=sum{k=0..floor(n/2), C(n,2k)*F(2k+1)}. [From _Paul Barry_, Oct 14 2009]
%t A059512 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 *)
%o A059512 (PARI) a(n)=(fibonacci(2*n-1)+fibonacci(n-2))/2
%Y A059512 Cf. A000667, A059216, A059219, A059502, A027994.
%Y A059512 a(1-2n)=A005207(2n), a(-2n)=A056014(2n+1).
%K A059512 easy,nonn
%O A059512 0,4
%A A059512 _Floor van Lamoen_, Jan 21 2001