OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..798
Index entries for linear recurrences with constant coefficients, signature (1,322,-322,-1,1).
FORMULA
a(1) = 0, a(2) = 2, a(3) = 116, a(4) = 798, a(5) = 37512; for n > 5, a(n) = a(n-1) + 322*a(n-2) - 322*a(n-3) - a(n-4) + a(n-5).
a(n) = 322*a(n-2) - a(n-4) + 160.
a(n) = 161*a(n-2) + 360*A257940(n-2) + 116.
G.f.: -2*x^2*(3*x^3+19*x^2+57*x+1) / ((x-1)*(x^2-18*x+1)*(x^2+18*x+1)). - Colin Barker, May 14 2015
MATHEMATICA
LinearRecurrence[{1, 322, -322, -1, 1}, {0, 2, 116, 798, 37512}, 30] (* Vincenzo Librandi, May 15 2015 *)
PROG
(Magma) I:=[0, 2, 116, 798, 37512]; [n le 5 select I[n] else Self(n-1)+322*Self(n-2)-322*Self(n-3)-Self(n-4)+Self(n-5): n in [1..19]];
(PARI) concat(0, Vec(-2*(3*x^3+19*x^2+57*x+1)/((x-1)*(x^2-18*x+1)*(x^2+18*x+1)) + O(x^100))) \\ Colin Barker, May 14 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Arkadiusz Wesolowski, May 13 2015
STATUS
approved