A120743 a(n) = (1/2)*(1 + 3*i)^n + (1/2)*(1 - 3*i)^n where i = sqrt(-1).
1, -8, -26, 28, 316, 352, -2456, -8432, 7696, 99712, 122464, -752192, -2729024, 2063872, 31417984, 42197248, -229785344, -881543168, 534767104, 9884965888, 14422260736, -70005137408, -284232882176, 131585609728, 3105500041216
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..100
- Index entries for linear recurrences with constant coefficients, signature (2, -10).
Crossrefs
Cf. A006495
Programs
-
Magma
[ n eq 1 select 1 else n eq 2 select -8 else 2*Self(n-1) -10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 24 2011
-
Mathematica
LinearRecurrence[{2,-10}, {1,-8}, 30] (* G. C. Greubel, Nov 09 2018 *)
-
PARI
x='x+O('x^30); Vec((1-10*x)/(1-2*x+10*x^2)) \\ G. C. Greubel, Nov 09 2018
Formula
a(n) = 2*a(n-1) - 10*a(n-2).
G.f.: x*(1-10*x)/(10*x^2 - 2*x + 1).
a(n) mod 9 = 1. - Paul Curtz, Apr 20 2011
G.f.: G(0)/(2*x) - 1/x, where G(k) = 1 + 1/(1 - x*(9*k+1)/(x*(9*k+10) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 29 2013
E.g.f.: exp(x)*cos(3*x). - Sergei N. Gladkovskii, May 29 2013
Extensions
a(0)=1: a(n) is main diagonal of A009116(n). - Paul Curtz, Jul 22 2011
Edited by Jon E. Schoenfield, Nov 09 2018
Comments