Tool to decompose a number in 2 factors. The factorization in 2 factors of an integer N consists in finding 2 divisors which can be multiplied to give N.

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day! You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

Tool to decompose a number in 2 factors. The factorization in 2 factors of an integer N consists in finding 2 divisors which can be multiplied to give N.

Answers to Questions

How to find two factors of a numbers?

Perform a search of all the divisors of the number N (this step can be carried out via a decomposition into prime factors, see the tool for listing the divisors available on dCode).

All the combinations of 2 factors having for product the number N are the pairs \( d_1, d_2 \) with \( d_1 \) a divisor and \( d_2 = N / d_1 \) the result of the division.

Example: 12 can be decomposed into prime factors as 2*2*3. The list of divisors of 12 is therefore composed of 2, 3 but also 2*2=4 and 2*3=6. So we can deduce couples of two factors: 2*6 and 3*4 (There are also 12*1 but it is obvious).

Note that N is a multiple of all divisor numbers found.

The list obtained is exhaustive, but if there are many factors, the program could be limited to the first results.

dCode retains ownership of the source code of the script 2 Factors Decomposition online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. So if you need to download the online 2 Factors Decomposition script for offline use, check contact page !