A182189 a(n) = 6*a(n-1) - a(n-2) - 4 with n > 1, a(0)=1, a(1)=3.
1, 3, 13, 71, 409, 2379, 13861, 80783, 470833, 2744211, 15994429, 93222359, 543339721, 3166815963, 18457556053, 107578520351, 627013566049, 3654502875939, 21300003689581, 124145519261543, 723573111879673, 4217293152016491, 24580185800219269, 143263821649299119
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
Programs
-
Magma
I:=[1,3]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2)-4: n in [1..41]]; // Bruno Berselli, Jun 07 2012
-
Mathematica
m = -11;n = -1; c = 0; list3 = Reap[While[c < 22, t = 6 n - m - 4; Sow[t];m = n; n = t;c++]][[2,1]] CoefficientList[Series[(1-4*x-x^2)/((1-x)*(1-6*x+x^2)),{x,0,40}],x] (* Vincenzo Librandi, Jul 26 2012 *) 1 + Fibonacci[2*Range[0, 40], 2] (* G. C. Greubel, May 24 2021 *)
-
PARI
my(x='x+O('x^40)); Vec((1-4*x-x^2)/((1-x)*(1-6*x+x^2))) \\ Altug Alkan, Dec 30 2017
-
Sage
[1 + lucas_number1(2*n,2,-1) for n in (0..40)] # G. C. Greubel, May 24 2021
Formula
G.f.: (1-4*x-x^2)/((1-x)*(1-6*x+x^2)). - Bruno Berselli, Jun 07 2012
a(n) = 1 + A000129(2*n). - G. C. Greubel, May 24 2021
Comments