%I #22 Dec 16 2023 15:51:13
%S 0,1,6,21,85,342,1365,5461,21846,87381,349525,1398102,5592405,
%T 22369621,89478486,357913941,1431655765,5726623062,22906492245,
%U 91625968981,366503875926,1466015503701,5864062014805,23456248059222,93824992236885,375299968947541
%N Expansion of x*(1+3*x)/ ( (1-4*x)*(1+x+x^2)).
%C a(n) and successive differences define a square array T(0,k) = a(k), T(n,k) = T(n-1,k+1) - T(n-1,k):
%C 0, 1, 6, 21, 85, 342,...
%C 1, 5, 15, 64, 257, 1023,...
%C 4, 10, 49, 193, 766, 3073,...
%C As with any sequence which obeys a homogeneous linear recurrence (we say it once, only once and we shall not repeat it), the recurrence is also valid for the rows of such arrays of higher order differences.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,3,4).
%F a(n) = 3*a(n-1) + 3*a(n-2) + 4*a(n-3), n >= 3.
%F a(n) = A024495(2*n).
%F a(n) = A113405(2*n) + A113405(2*n+1).
%F a(n+1) - 4*a(n) = A132677(n).
%F a(n+3) - a(n) = 21*4^n.
%F a(n) = A178872(n) + 3*A178872(n-1) = (4^n-A061347(n+1))/3. - _R. J. Mathar_, Jun 08 2011
%p A061347 := proc(n) op(1+(n mod 3),[-2,1,1]) ; end proc:
%p A191597 := proc(n) (4^n-A061347(n+1))/3 ; end proc:
%p seq(A191597(n),n=0..30) ; # _R. J. Mathar_, Jun 08 2011
%o (PARI) a(n)=([0,1,0; 0,0,1; 4,3,3]^n*[0;1;6])[1,1] \\ _Charles R Greathouse IV_, Jul 06 2017
%K nonn,easy
%O 0,3
%A _Paul Curtz_, Jun 08 2011