A246313 G.f.: (-1+6*x)/(1-3*x-2*x^2).
-1, 3, 7, 27, 95, 339, 1207, 4299, 15311, 54531, 194215, 691707, 2463551, 8774067, 31249303, 111296043, 396386735, 1411752291, 5028030343, 17907595611, 63778847519, 227151733779, 809012896375, 2881342156683, 10262052262799, 36548841101763, 130170627830887, 463609565696187, 1651169952750335
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,2).
Programs
-
Magma
I:=[-1,3]; [n le 2 select I[n] else 3*Self(n-1)+2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 27 2014
-
Maple
a:= LRETools[REtoproc](a(n)=3*a(n-1)+2*a(n-2),a(n),{a(0)=-1,a(1)=3}): seq(a(i),i=0..100); # Robert Israel, Aug 27 2014
-
Mathematica
CoefficientList[Series[(6 x - 1)/(1 - 3 x - 2 x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 27 2014 *)
-
PARI
Vec((-1+6*x)/(1-3*x-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 02 2014
Formula
a(n) = 3*a(n-1) + 2*a(n-2) with a(0)=-1, a(1)=3.
a(n) = -(17+9*sqrt(17))/34*(3/2-sqrt(17)/2)^n+(-17+9*sqrt(17))/34*(3/2+sqrt(17)/2)^n. For n >= 3, a(n) = round((-17+9*sqrt(17))/34*(3/2+sqrt(17)/2)^n). - Robert Israel, Aug 27 2014
Comments