OFFSET
0,2
COMMENTS
Alternating sum of powers of 14.
More generally, the ordinary generating function for the Sum_{k = 0..n} (-1)^k*m^k is 1/(1 + (m - 1)*x - m*x^2). Also, Sum_{k = 0..n} (-1)^k*m^k = ((-1)^n*m^(n + 1) + 1)/(m + 1).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..870
Index entries for linear recurrences with constant coefficients, signature (-13,14).
FORMULA
MATHEMATICA
Table[((-1)^n 14^(n + 1) + 1)/15, {n, 0, 18}]
LinearRecurrence[{-13, 14}, {1, -13}, 19]
Table[Sum[(-1)^k*14^k, {k, 0, n}], {n, 0, 18}]
PROG
(PARI) x='x+O('x^30); Vec(1/(1 + 13*x - 14*x^2)) \\ G. C. Greubel, May 26 2018
(Magma) I:=[1, -19]; [n le 2 select I[n] else -13*Self(n-1) +14*Self(n-2): n in [1..30]]; // G. C. Greubel, May 26 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Feb 04 2016
STATUS
approved