login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A127111
a(n) = (n+1)! - (n)!!.
1
0, 1, 4, 21, 112, 705, 4992, 40215, 362496, 3627855, 39912960, 478991205, 6226974720, 87178156065, 1307673722880, 20922787860975, 355687417774080, 6402373671268575, 121645100223037440, 2432902007521910925
OFFSET
0,3
LINKS
FORMULA
a(n) = A000142(n+1) - A006882(n). - Michel Marcus, Aug 15 2013
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
Sequence in context: A301972 A026335 A027909 * A270787 A190089 A349300
KEYWORD
easy,nonn
AUTHOR
Zerinvary Lajos, Mar 21 2007
STATUS
approved