OFFSET
0,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (27,-236,672).
FORMULA
a(n) = 27*a(n-1) - 236*a(n-2) + 672*a(n-3), n>=3. - Vincenzo Librandi, Mar 15 2011
a(n) = 20*a(n-1) - 96*a(n-2) + 7^n for n>1, a(0)=1, a(1)=27. - Vincenzo Librandi, Mar 15 2011
a(n) = (7^(n+2) - 10*8^(n+1) + 3*12^(n+1))/5. - Bruno Berselli, Mar 15 2011
EXAMPLE
a(5) = (7^(5 + 2) - 10*8^(5 + 1) + 3*12^(5 + 1))/5 = (7^7 - 10*8^6 + 3*12 ^ 6)/5 = 7160055/5 = 1432011. - Indranil Ghosh, Feb 28 2017
MATHEMATICA
CoefficientList[Series[1/((1 - 7 x) (1 - 8 x) (1 - 12 x)), {x, 0, 16}], x] (* or *) LinearRecurrence[{27, -236, 672}, {1, 27, 493}, 17] (* or *) Table[(7^(n + 2) - 10 8^(n + 1) + 3 12^(n + 1))/5, {n, 0, 16}] (* Indranil Ghosh, Feb 28 2017 *)
PROG
(PARI) a(n) = (7^(n+2)-10*8^(n+1)+3*12^(n+1))/5; \\ Indranil Ghosh, Feb 28 2017
(Python) def A020969(n): return (7**(n+2)-10*8**(n+1)+3*12**(n+1))/5 # Indranil Ghosh, Feb 28 2017
(Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-7*x)*(1-8*x)*(1-12*x)))); // G. C. Greubel, May 31 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved