OFFSET
1,1
LINKS
FORMULA
G.f.: x * (3 - 4*x)/((1 - x)^2 * (1 - 4*x)).
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3).
a(n) = 2 * A014825(n) + n.
a(n) = (2*4^(n+1) + 3*n - 8)/9.
a(n) = Sum_{k=0..n-1} (4 - n + k) * 4^k.
E.g.f.: exp(x)*(8*exp(3*x) + 3*x - 8)/9. - Stefano Spezia, May 28 2023
MATHEMATICA
LinearRecurrence[{6, -9, 4}, {3, 14, 57}, 25] (* Amiram Eldar, Apr 23 2022 *)
PROG
(PARI) my(N=30, x='x+O('x^N)); Vec(x*(3-4*x)/((1-x)^2*(1-4*x)))
(PARI) a(n) = (2*4^(n+1)+3*n-8)/9;
(PARI) b(n, k) = sum(j=0, n-1, (k-n+j)*k^j);
a(n) = b(n, 4);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Apr 23 2022
STATUS
approved