OFFSET
1,2
MATHEMATICA
Table[If[EvenQ[n], 2(n/2 + 1)! - 1, ((n + 1)/2 + 1)! - 1], {n, 40}] (* Alonso del Arte, Feb 19 2020 *)
PROG
(PARI) a(n)=if(n%2, (n\2+2)!, (n/2+1)!*2) - 1 \\ Charles R Greathouse IV, Mar 27 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Better description and more terms from Erich Friedman.
STATUS
approved