OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (9,-15,7).
FORMULA
a(n) = (7^(n+1) - 6*n - 7)/36. - Rolf Pleisch, Oct 19 2010
a(1)=1, a(2)=9, a(3)=66; for n > 3, a(n) = 9*a(n-1) - 15*a(n-2) + 7*a(n-3). - Harvey P. Dale, Jul 22 2013
a(n) = Sum_{i=0..n-1} 6^i*binomial(n+1,n-1-i). - Bruno Berselli, Nov 13 2015
G.f.: x / ((1 - x)^2*(1 - 7*x)). - Colin Barker, Jun 03 2020
EXAMPLE
For n=5, a(5) = 1*15 + 6*20 + 6^2*15 + 6^3*6 + 6^4*1 = 3267. - Bruno Berselli, Nov 13 2015
MAPLE
a:=n->sum((7^(n-j)-1)/6, j=0..n): seq(a(n), n=1..19); # Zerinvary Lajos, Jan 15 2007
MATHEMATICA
a[1] = 1; a[n_] := 7*a[n-1]+n; Table[a[n], {n, 10}] (* Zak Seidov, Feb 06 2011 *)
LinearRecurrence[{9, -15, 7}, {1, 9, 66}, 30] (* Harvey P. Dale, Jul 22 2013 *)
PROG
(PARI) Vec(x / ((1 - x)^2*(1 - 7*x)) + O(x^25)) \\ Colin Barker, Jun 03 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved