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.

A052937 Expansion of (2-3*x-x^2)/((1-x)*(1-2*x-x^2)).

This page as a plain text file.
%I A052937 #36 Jul 02 2025 16:01:58
%S A052937 2,3,6,13,30,71,170,409,986,2379,5742,13861,33462,80783,195026,470833,
%T A052937 1136690,2744211,6625110,15994429,38613966,93222359,225058682,
%U A052937 543339721,1311738122,3166815963,7645370046,18457556053,44560482150,107578520351,259717522850
%N A052937 Expansion of (2-3*x-x^2)/((1-x)*(1-2*x-x^2)).
%H A052937 Colin Barker, <a href="/A052937/b052937.txt">Table of n, a(n) for n = 0..1000</a>
%H A052937 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=928">Encyclopedia of Combinatorial Structures 928</a>
%H A052937 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-1).
%F A052937 G.f.: (2-3*x-x^2)/((1-x)*(1-2*x-x^2)).
%F A052937 a(n) = 2*a(n-1) + a(n-2) - 2, with a(0)=2, a(1)=3, a(2)=6.
%F A052937 a(n) = 1 + Sum_{alpha=RootOf(-1+2*z+z^2)} (1 + alpha)*alpha^(-1-n)/4.
%F A052937 a(n) = A000129(n+1) + 1, where A000129 are the Pell Numbers. - _Graeme McRae_, Aug 03 2006
%F A052937 a(n) = (1 + (-(1-sqrt(2))^(1+n) + (1+sqrt(2))^(1+n))/(2*sqrt(2))). - _Colin Barker_, Mar 16 2016
%p A052937 spec:= [S,{S=Union(Sequence(Z),Sequence(Union(Z,Z,Prod(Z,Z))))},unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
%p A052937 seq(coeff(series((2-3*x-x^2)/((1-x)*(1-2*x-x^2)), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 18 2019
%t A052937 CoefficientList[Series[(2-3x-x^2)/((1-x)(1-2x-x^2)),{x,0,30}],x] (* or *) LinearRecurrence[{3,-1,-1},{2,3,6},40] (* _Harvey P. Dale_, May 27 2017 *)
%t A052937 1+Fibonacci[Range[31],2] (* _G. C. Greubel_, Oct 18 2019 *)
%o A052937 (PARI) Vec((2-3*x-x^2)/((1-x)*(1-2*x-x^2)) + O(x^50)) \\ _Colin Barker_, Mar 16 2016
%o A052937 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (2-3*x-x^2)/((1-x)*(1-2*x-x^2)) )); // _G. C. Greubel_, Oct 18 2019
%o A052937 (Sage) [1 + lucas_number1(n+1, 2, -1) for n in (0..30)] # _G. C. Greubel_, Oct 18 2019
%o A052937 (GAP) a:=[2,3,6];; for n in [4..30] do a[n]:=3*a[n-1]-a[n-2]-a[n-3]; od; a; # _G. C. Greubel_, Oct 18 2019
%Y A052937 Cf. A000129, A001333.
%K A052937 easy,nonn
%O A052937 0,1
%A A052937 encyclopedia(AT)pommard.inria.fr, Jan 25 2000
%E A052937 More terms from _James Sellers_, Jun 05 2000