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.

This page as a plain text file.
%I A066629 #39 May 06 2025 07:54:28
%S A066629 1,2,5,8,15,24,41,66,109,176,287,464,753,1218,1973,3192,5167,8360,
%T A066629 13529,21890,35421,57312,92735,150048,242785,392834,635621,1028456,
%U A066629 1664079,2692536,4356617,7049154,11405773,18454928,29860703,48315632,78176337,126491970,204668309
%N A066629 a(n) = 2*Fibonacci(n+2) + ((-1)^n - 3)/2.
%C A066629 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) + ...
%C A066629 Equals row sums of triangle A153864. - _Gary W. Adamson_, Jan 03 2009
%H A066629 Harry J. Smith, <a href="/A066629/b066629.txt">Table of n, a(n) for n = 0..250</a>
%H A066629 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-1,-1).
%F A066629 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.
%F A066629 G.f.: (1+x+x^2)/((1-x-x^2)(1-x)(1+x)). - _R. J. Mathar_, Sep 19 2008
%F A066629 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
%e A066629 a(5) = A(5,0) + A(4,1) + A(3,2) = 6 + 11 + 7 = 24.
%p A066629 A066629 := proc(n)
%p A066629     2*combinat[fibonacci](n+2)+((-1)^n-3)/2 ;
%p A066629 end proc:
%p A066629 seq(A066629(n),n=0..10) ; # _R. J. Mathar_, Apr 13 2016
%t A066629 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 *)
%t A066629 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 *)
%o A066629 (PARI) a(n) = { 2*fibonacci(n+2) + ((-1)^n - 3)/2 } \\ _Harry J. Smith_, Mar 14 2010
%o A066629 (Python)
%o A066629 from sympy import fibonacci
%o A066629 def A066629(n): return (fibonacci(n+2)<<1)-1-(n&1) # _Chai Wah Wu_, May 05 2025
%Y A066629 Cf. A051597.
%Y A066629 Cf. A153864. - _Gary W. Adamson_, Jan 03 2009
%K A066629 easy,nonn
%O A066629 0,2
%A A066629 _Miklos Kristof_, Dec 18 2002