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.

A066629 a(n) = 2*Fibonacci(n+2) + ((-1)^n - 3)/2.

Original entry on oeis.org

1, 2, 5, 8, 15, 24, 41, 66, 109, 176, 287, 464, 753, 1218, 1973, 3192, 5167, 8360, 13529, 21890, 35421, 57312, 92735, 150048, 242785, 392834, 635621, 1028456, 1664079, 2692536, 4356617, 7049154, 11405773, 18454928, 29860703, 48315632, 78176337, 126491970, 204668309
Offset: 0

Views

Author

Miklos Kristof, Dec 18 2002

Keywords

Comments

Fibonacci-like numbers made from Asher Auel's triangle A(n,m) (A051597) satisfying A(0,0)=1, A(1,0)=2, A(1,1)=2, etc..: then a(0)=1, a(1)=2, a(n) = A(n,0) + A(n-1,1) + A(n-2,2) + ...
Equals row sums of triangle A153864. - Gary W. Adamson, Jan 03 2009

Examples

			a(5) = A(5,0) + A(4,1) + A(3,2) = 6 + 11 + 7 = 24.
		

Crossrefs

Cf. A051597.
Cf. A153864. - Gary W. Adamson, Jan 03 2009

Programs

  • Maple
    A066629 := proc(n)
        2*combinat[fibonacci](n+2)+((-1)^n-3)/2 ;
    end proc:
    seq(A066629(n),n=0..10) ; # R. J. Mathar, Apr 13 2016
  • Mathematica
    Join[{b=1},a=0;Table[If[OddQ[a]&&EvenQ[b],c=a+b+2,c=a+b+1];a=b;b=c,{n,0,5!}]] (* Vladimir Joseph Stephan Orlovsky, Jan 10 2011 *)
    Table[2Fibonacci[n+2]+((-1)^n-3)/2,{n,0,40}] (* or *) LinearRecurrence[ {1,2,-1,-1},{1,2,5,8},41] (* Harvey P. Dale, Oct 09 2011 *)
  • PARI
    a(n) = { 2*fibonacci(n+2) + ((-1)^n - 3)/2 } \\ Harry J. Smith, Mar 14 2010
    
  • Python
    from sympy import fibonacci
    def A066629(n): return (fibonacci(n+2)<<1)-1-(n&1) # Chai Wah Wu, May 05 2025

Formula

Lim_{n->oo} a(n)/a(n-1) = (1+sqrt(5))/2. If n is even: a(n) = a(n-1) + a(n-2) + 2; if n is odd: a(n) = a(n-1) + a(n-2) + 1.
G.f.: (1+x+x^2)/((1-x-x^2)(1-x)(1+x)). - R. J. Mathar, Sep 19 2008
a(0)=1, a(1)=2, a(2)=5, a(3)=8, a(n) = a(n-1)+2*a(n-2)-a(n-3)-a(n-4). - Harvey P. Dale, Oct 09 2011