Tool for calculating the double factorial. The double factorial n!! is the product of non-zero positive integers less than or equal to n that have the same parity as n (even or odd).

Double Factorial - dCode

Tag(s) : Arithmetics

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

Tool for calculating the double factorial. The double factorial n!! is the product of non-zero positive integers less than or equal to n that have the same parity as n (even or odd).

The double factorial (also called semifactorial) of a number $ n $, denoted by $ n!! $ (with 2 exclamation marks), is the multiplication (the product) of all non-zero integers less than or equal to $ n $ that have the same parity.

$$ n!! = \prod_{k=0}^{\left\lceil\frac{n}{2}\right\rceil - 1} (n-2k) = n (n-2) (n-4) \cdots $$

If $ n $ is an even number (multiple of 2) then $ n !! $ is the multiplication of all multiples of $ 2 $ less or equal than $ n $ (and greater than $ 0 $)

If $ n $ is an odd number (not a multiple of 2) then $ n !! $ is the multiplication of all non-multiple numbers of $ 2 $ less or equal than $ n $ (and greater than $ 0 $).

__Example:__ $$ 8!! = 2 \times 4 \times 6 \times 8 = 384 $$

__Example:__ $$ 5!! = 1 \times 3 \times 5 = 15 $$

Be careful not to confuse the double factorial $ n !! $ with the factorial of factorial $ (n!)! $

By convention, the double factorial of zero is equal to 1: $ 0 !! = 1 $

The values of the first double factorials: $$ 0!! = 1 \\ 1!! = 1 \\ 2!! = 2 \\ 3!! = 3 \\ 4!! = 8 \\ 5!! = 15 \\ 6!! = 48 \\ 7!! = 105 \\ 8!! = 384 \\ 9!! = 945 \\ 10!! = 3840 $$

dCode retains ownership of the online 'Double Factorial' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Double Factorial download for offline use on PC, tablet, iPhone or Android !

Please, check our community Discord for help requests!

factorial,double,exclamation,mark,semifactorial,odd,even

Source : https://www.dcode.fr/double-factorial

© 2020 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲