OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
FORMULA
MAPLE
seq(factorial(n+1) - doublefactorial(n), n = 0..20); # G. C. Greubel, Jan 30 2020
MATHEMATICA
Table[((n+1)!-(n)!!), {n, 0, 20}]
PROG
(PARI) vector(21, n, my(m=n-1); if(m%2==0, (m+1)! - 2^(m/2)*(m/2)!, (m+1)! - m!/(2^((m-1)/2)*((m-1)/2)!)) ) \\ G. C. Greubel, Jan 30 2020
(Magma) DoubleFactorial:=func< n | &*[n..2 by -2] >;
[Factorial(n+1) - DoubleFactorial(n): n in [0..20]]; // G. C. Greubel, Jan 30 2020
(Sage) [factorial(n+1) - n.multifactorial(2) for n in (0..20)] # G. C. Greubel, Jan 30 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zerinvary Lajos, Mar 21 2007
STATUS
approved