A014990 a(n) = (1 - (-8)^n)/9.
1, -7, 57, -455, 3641, -29127, 233017, -1864135, 14913081, -119304647, 954437177, -7635497415, 61083979321, -488671834567, 3909374676537, -31274997412295, 250199979298361, -2001599834386887, 16012798675095097
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (-7,8).
Crossrefs
Programs
-
Magma
I:=[1, -7]; [n le 2 select I[n] else -7*Self(n-1) +8*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
-
Maple
a:=n->sum ((-8)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
-
Mathematica
QBinomial[Range[20],1,-8] (* or *) LinearRecurrence[{-7,8},{1,-7},20] (* Harvey P. Dale, Dec 19 2011 *)
-
PARI
a(n)=(1-(-8)^n)/9 \\ Charles R Greathouse IV, Oct 07 2015
-
Sage
[gaussian_binomial(n,1,-8) for n in range(1,20)] # Zerinvary Lajos, May 28 2009
Formula
a(n) = a(n-1) + q^{(n-1)} = {(q^n - 1) / (q - 1)}
From Philippe Deléham, Feb 13 2007: (Start)
a(1)=1, a(2)=-7, a(n) = -7*a(n-1) + 8*a(n-2) for n > 2.
a(n) = (-1)^(n+1)*A015565(n).
G.f.: x/(1 + 7*x - 8*x^2). (End)
E.g.f.: (exp(x) - exp(-8*x))/9. - G. C. Greubel, May 26 2018
Extensions
Better name from Ralf Stephan, Jul 14 2013
Comments