OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..445
FORMULA
a(n) = n! for n < 5, otherwise a(n) = (n^5 -n^4 -n^3 +n^2 -1)*a(n-5).
MATHEMATICA
a[n_]:= a[n]= If[n<5, n!, (n^2*(n-1)*(n^2-1) -1)*a[n-5]];
Table[a[n], {n, 0, 30}]
PROG
(Magma)
function a(n) // a = A123150
if n le 4 then return Factorial(n);
else return (n^2*(n-1)*(n^2-1) -1)*a(n-5);
end if;
end function;
[a(n): n in [0..30]]; // G. C. Greubel, Jul 17 2023
(SageMath)
@CachedFunction # a = A123150
def a(n): return factorial(n) if (n<5) else (n^2*(n-1)*(n^2-1) -1)*a(n-5)
[a(n) for n in (0..30)] # G. C. Greubel, Jul 17 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Oct 01 2006
EXTENSIONS
Edited by N. J. A. Sloane, Oct 04 2006
Edited by G. C. Greubel, Jul 17 2023
STATUS
approved