%I #27 May 28 2023 22:21:25
%S 3,14,57,228,911,3642,14565,58256,233019,932070,3728273,14913084,
%T 59652327,238609298,954437181,3817748712,15270994835,61083979326,
%U 244335917289,977343669140,3909374676543,15637498706154,62549994824597,250199979298368,1000799917193451
%N a(1) = 3; for n > 1, a(n) = 4*a(n-1) + 4 - n.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-9,4).
%F G.f.: x * (3 - 4*x)/((1 - x)^2 * (1 - 4*x)).
%F a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3).
%F a(n) = 2 * A014825(n) + n.
%F a(n) = (2*4^(n+1) + 3*n - 8)/9.
%F a(n) = Sum_{k=0..n-1} (4 - n + k) * 4^k.
%F E.g.f.: exp(x)*(8*exp(3*x) + 3*x - 8)/9. - _Stefano Spezia_, May 28 2023
%t LinearRecurrence[{6, -9, 4}, {3, 14, 57}, 25] (* _Amiram Eldar_, Apr 23 2022 *)
%o (PARI) my(N=30, x='x+O('x^N)); Vec(x*(3-4*x)/((1-x)^2*(1-4*x)))
%o (PARI) a(n) = (2*4^(n+1)+3*n-8)/9;
%o (PARI) b(n, k) = sum(j=0, n-1, (k-n+j)*k^j);
%o a(n) = b(n, 4);
%Y Cf. A064617, A353094, A353096, A353097, A353098, A353099, A353100.
%Y Cf. A014825.
%K nonn,easy
%O 1,1
%A _Seiichi Manyama_, Apr 23 2022