OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (9,-15,7).
FORMULA
G.f.: x * (6 - 7 * x)/((1 - x)^2 * (1 - 7 * x)).
a(n) = 9*a(n-1) - 15*a(n-2) + 7*a(n-3).
a(n) = 5 * A014830(n) + n.
a(n) = (5*7^(n+1) + 6*n - 35)/36.
a(n) = Sum_{k=0..n-1} (7 - n + k)*7^k.
E.g.f.: exp(x)*(35*(exp(6*x) - 1) + 6*x)/36. - Stefano Spezia, May 29 2023
MATHEMATICA
LinearRecurrence[{9, -15, 7}, {6, 47, 333}, 21] (* Amiram Eldar, Apr 23 2022 *)
PROG
(PARI) my(N=30, x='x+O('x^N)); Vec(x*(6-7*x)/((1-x)^2*(1-7*x)))
(PARI) a(n) = (5*7^(n+1)+6*n-35)/36;
(PARI) b(n, k) = sum(j=0, n-1, (k-n+j)*k^j);
a(n) = b(n, 7);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Apr 23 2022
STATUS
approved