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!

This page is using the new English version of dCode, please make comments !

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?

dCode begins with a search of all the divisors of the number N, via decomposition into prime factors. Then making combinations of factors, it is possible to find all combinations of 2 factors having as product's result the number N (see the divisors tool on dCode).

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.

Ask a new question

Source code

dCode retains ownership of the source code of the script 2 Factors Decomposition. 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, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the 2 Factors Decomposition script for offline use, for you, your company or association, see you on contact page !

dCode uses cookies to customize the site content, analyze user behavior and adapt dCode to your use. Some data is stored and collected for advertising purposes and may be shared with our partners. OK