OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (8,-7).
FORMULA
a(n) = 7^n + a(n-1), with a(1)=0.
From Robert Israel, Sep 24 2014: (Start)
a(n) = 7*(7^n - 7)/6.
G.f.: 49*x^2/((1-x)*(1-7*x)).
E.g.f.: 7*(exp(7*x) - 7*exp(x)+42)/6. (End)
a(n) = A104896(n) - 7. - Michel Marcus, Sep 25 2014
a(n) = 8*a(n-1) - 7*a(n-2). - G. C. Greubel, Jul 26 2016
MATHEMATICA
RecurrenceTable[{a[1] == 0, a[n] == a[n-1] + 7^n}, a, {n, 30}] (* Vincenzo Librandi, Sep 24 2014 *)
LinearRecurrence[{8, -7}, {0, 49}, 25] (* G. C. Greubel, Jul 26 2016 *)
Join[{0}, Accumulate[7^Range[2, 20]]] (* Harvey P. Dale, Jul 29 2019 *)
PROG
(Magma) [n le 1 select (n-1) else Self(n-1) + 7^n: n in [1..30] ]; // Vincenzo Librandi, Sep 24 2014
(PARI) a(n)=7*(7^n - 7)/6 \\ Charles R Greathouse IV, Jul 26 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 30 2009
EXTENSIONS
Definition and examples simplified by Jon E. Schoenfield, Jun 19 2010
STATUS
approved