OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..400
FORMULA
a(n) = n!*b(n), where b(n) = (3*n*(n+1) + 1)*b(n-2)/(n*(n-1)), b(0) = b(1) = 1.
a(n) = A003215(n) * a(n-2), n>2.
MATHEMATICA
a[n_]:= a[n]= If[n<2, 1, (3*n^2 +3*n +1)*a[n-2]]; Table[a[n], {n, 0, 30}]
nxt[{n_, a_, b_}]:={n+1, b, a(3(n+1)^2+3(n+1)+1)}; NestList[nxt, {1, 1, 1}, 20][[All, 2]] (* Harvey P. Dale, Jan 08 2023 *)
PROG
(Magma)
function a(n)
if n lt 2 then return 1;
else return (3*n*(n+1) +1)*a(n-2);
end if; return a;
end function;
[a(n): n in [0..30]]; // G. C. Greubel, Jul 20 2021
(Sage)
def a(n): return 1 if (n<2) else (3*n*(n+1) +1)*a(n-2)
[a(n) for n in (0..30)] # G. C. Greubel, Jul 20 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 25 2006
EXTENSIONS
Definition replaced by recurrence - the Assoc. Eds. of the OEIS, Mar 27 2010
Edited by G. C. Greubel, Jul 20 2021
STATUS
approved