A086902 a(n) = 7*a(n-1) + a(n-2), starting with a(0) = 2 and a(1) = 7.
2, 7, 51, 364, 2599, 18557, 132498, 946043, 6754799, 48229636, 344362251, 2458765393, 17555720002, 125348805407, 894997357851, 6390330310364, 45627309530399, 325781497023157, 2326097788692498, 16608466017870643, 118585359913786999, 846705985414379636
Offset: 0
Examples
a(4) = 7*a(3) + a(2) = 7*364 + 51 = 2599.
Links
Crossrefs
Programs
-
Magma
I:=[2,7]; [n le 2 select I[n] else 7*Self(n-1)+Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 19 2016
-
Mathematica
RecurrenceTable[{a[0] == 2, a[1] == 7, a[n] == 7 a[n-1] + a[n-2]}, a, {n, 30}] (* Vincenzo Librandi, Sep 19 2016 *) LinearRecurrence[{7,1},{2,7},30] (* Harvey P. Dale, May 25 2023 *)
-
PARI
a(n)=([0,1; 1,7]^n*[2;7])[1,1] \\ Charles R Greathouse IV, Apr 06 2016
Formula
a(n) = ((7+sqrt(53))/2)^n + ((7-sqrt(53))/2)^n.
E.g.f. : 2exp(7x/2)cosh(sqrt(53)x/2); a(n)=2^(1-n)sum{k=0..floor(n/2), C(n, 2k)53^k7^(n-2k)}. a(n)=2T(n, 7i/2)(-i)^n with T(n, x) Chebyshev's polynomials of the first kind (see A053120) and i^2=-1. - Paul Barry, Nov 15 2003
G.f.: (2-7x)/(1-7x-x^2). - Philippe Deléham, Nov 16 2008
From Johannes W. Meijer, Jun 12 2010: (Start)
Comments