login
a(n+3) = (8 - 3*n)*a(n-1) + (-24 + 4*n)*a(n) + (22 - n)*a(n+1) - 8*a(n+2).
0

%I #18 Jun 19 2021 16:38:48

%S 1,-8,84,-836,8617,-87016,869799,-8590272,83796504,-806946224,

%T 7666848877,-71824221768,662987321281,-6025366832504,53867639536838,

%U -473272010699496,4081721963157687,-34511324853373512,285631757521047043,-2309922250334330096,18213524452315660914

%N a(n+3) = (8 - 3*n)*a(n-1) + (-24 + 4*n)*a(n) + (22 - n)*a(n+1) - 8*a(n+2).

%F For n >= 1, a(n+3) = (8 - 3*n)*a(n-1) + (-24 + 4*n)*a(n) + (22 - n)*a(n+1) - 8*a(n+2). -- _Jianing Song_, Nov 10 2018

%t M[n_] := {{0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {8 - 3 n, -24 + 4 n, 22 - n, -8}};

%t v[0] ={1, -8, 84, -836};

%t v[n_] := v[n] = M[n].v[n - 1];

%t a = Table[v[n][[1]], {n, 0, 30}]

%t RecurrenceTable[{a[0]==1,a[1]==-8,a[2]==84,a[3]==-836,a[n+3]==(8-3n)a[n-1]+ (-24+4n)a[n]+(22-n)a[n+1]-8a[n+2]},a,{n,20}] (* _Harvey P. Dale_, Jun 19 2021 *)

%o (PARI) M(n) = [0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; 8 - 3*n, -24 + 4*n, 22 - n, -8];

%o T(n) = if(n==0, [1; -8; 84; -836], M(n)*T(n-1))

%o a(n) = T(n)[1,1] \\ _Jianing Song_, Nov 10 2018

%K sign,easy,less

%O 0,2

%A _Roger L. Bagula_, Jun 16 2007

%E Edited, new name, and offset corrected by _Jianing Song_, Nov 10 2018