login
A130636
a(n) = n*a(n-3) + a(n-4) for n >= 4.
0
0, 1, 0, 0, 4, 1, 0, 28, 12, 1, 280, 160, 24, 3641, 2520, 520, 58280, 46481, 11880, 1107840, 987900, 295961, 24384360, 23829540, 8090964, 609904961, 643952400, 242285568, 17085429872, 19284524561, 7912519440
OFFSET
0,5
FORMULA
a(n) = n*a(n-3) + a(n-4) for n >= 4. - Jianing Song, Oct 10 2018
MATHEMATICA
M[n_] := {{0, 0, n, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}};
v[0] = {0, 0, 0, 1};
v[n_] := v[n] = M[n].v[n - 1];
a = Table[v[n][[1]], {n, 0, 30}]
PROG
(PARI) a(n) = if(n<4, n==1, n*a(n-3) + a(n-4)) \\ Jianing Song, Oct 10 2018
CROSSREFS
Sequence in context: A156811 A246609 A371080 * A299354 A117414 A085639
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jun 19 2007
EXTENSIONS
Edited, new name, and offset corrected by Jianing Song, Oct 10 2018
STATUS
approved