OFFSET
0,6
MAPLE
PROG
(Python)
from functools import cache
@cache
def sf(n):
if n == 0: return 1
return n * sf(n - 1) + (-1 if n % 2 else 1)
def a(n):
h, r = divmod(n, 2)
return sf(h) * (h + 1) if r else sf(h)
print([a(n) for n in range(33)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Apr 25 2024
STATUS
approved