OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (-12,13).
FORMULA
a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1), with q=-13.
a(n) = Sum_{j=0..n-1} (-13)^j. - Zerinvary Lajos, Dec 16 2008
G.f.: x/((1 - x)*(1 + 13*x)). - Vincenzo Librandi, Oct 22 2012
a(n) = -12*a(n-1) + 13*a(n-2). - Vincenzo Librandi, Oct 22 2012
From G. C. Greubel, May 26 2018: (Start)
a(n) = (1 - (-13)^n)/14.
E.g.f.: (exp(x) - exp(-13*x))/14. (End)
MAPLE
a:=n->sum ((-13)^j, j=0..n-1): seq(a(n), n=0..20); # Zerinvary Lajos, Dec 16 2008
MATHEMATICA
QBinomial[Range[20], 1, -13] (* Harvey P. Dale, May 02 2012 *)
LinearRecurrence[{-12, 13}, {1, -12}, 30] (* Vincenzo Librandi, Oct 22 2012 *)
PROG
(Sage) [gaussian_binomial(n, 1, -13) for n in range(1, 18)] # Zerinvary Lajos, May 28 2009
(Magma) I:=[1, -12]; [n le 2 select I[n] else -12*Self(n-1)+13*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
(PARI) for(n=1, 30, print1((1-(-13)^n)/14, ", ")) \\ G. C. Greubel, May 26 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Jan 13 2009 at the suggestion of R. J. Mathar
STATUS
approved