Factor Calculator
The factors of 60 are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60: 60 has 12 factors in 6 factor pairs, adding up to 168, and since 60 = 2² × 3 × 5 the count is (2 + 1)(1 + 1)(1 + 1) = 12. The factors other than 60 itself add up to 108, more than 60, so 60 is abundant; type any whole number up to 10^20 for its factors, pairs, count and sum, or switch to the common factors of two or three numbers.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
Factors of 60
60 has 12 factors
60 = 2² × 3 × 5; composite, abundant.
All factors of 60
1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
- Number
- 60
- Number of factors
- 12
- Sum of factors
- 168
- Sum of proper factors
- 108
- Prime factorization
- 2² × 3 × 5
- Count from the exponents
- (2 + 1)(1 + 1)(1 + 1) = 12
- Prime or composite
- Composite
- Perfect, abundant or deficient
- Abundant (108 > 60)
- Perfect square
- No
- Factor pairs
- 6
The working
- Split 60 into primes: 60 = 2² × 3 × 5.
- Every factor has the form 2^a × 3^b × 5^c with a = 0 to 2, b = 0 to 1, c = 0 to 1.
- Count: add 1 to each exponent and multiply: (2 + 1)(1 + 1)(1 + 1) = 12.
- Sum: for each prime add 1 + p + … + p^e, then multiply. (1 + 2 + 4)(1 + 3)(1 + 5) = 7 × 4 × 6 = 168.
- The proper factors (all except 60) add up to 108, which is more than 60, so 60 is abundant.
- Factor pairs: each factor up to the square root (√60 is between 7 and 8) pairs with 60 ÷ that factor, which gives 6 pairs.
Factor pairs
| Factor pair | Product | Sum |
|---|---|---|
| 1 × 60 | 60 | 61 |
| 2 × 30 | 60 | 32 |
| 3 × 20 | 60 | 23 |
| 4 × 15 | 60 | 19 |
| 5 × 12 | 60 | 17 |
| 6 × 10 | 60 | 16 |
Factors of the numbers 1 to 100
| Number | Factors | How many | Sum | Type |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | Neither prime nor composite · square |
| 2 | 1, 2 | 2 | 3 | Prime |
| 3 | 1, 3 | 2 | 4 | Prime |
| 4 | 1, 2, 4 | 3 | 7 | Composite · square |
| 5 | 1, 5 | 2 | 6 | Prime |
| 6 | 1, 2, 3, 6 | 4 | 12 | Composite · perfect |
| 7 | 1, 7 | 2 | 8 | Prime |
| 8 | 1, 2, 4, 8 | 4 | 15 | Composite |
| 9 | 1, 3, 9 | 3 | 13 | Composite · square |
| 10 | 1, 2, 5, 10 | 4 | 18 | Composite |
| 11 | 1, 11 | 2 | 12 | Prime |
| 12 | 1, 2, 3, 4, 6, 12 | 6 | 28 | Composite · abundant |
| 13 | 1, 13 | 2 | 14 | Prime |
| 14 | 1, 2, 7, 14 | 4 | 24 | Composite |
| 15 | 1, 3, 5, 15 | 4 | 24 | Composite |
| 16 | 1, 2, 4, 8, 16 | 5 | 31 | Composite · square |
| 17 | 1, 17 | 2 | 18 | Prime |
| 18 | 1, 2, 3, 6, 9, 18 | 6 | 39 | Composite · abundant |
| 19 | 1, 19 | 2 | 20 | Prime |
| 20 | 1, 2, 4, 5, 10, 20 | 6 | 42 | Composite · abundant |
| 21 | 1, 3, 7, 21 | 4 | 32 | Composite |
| 22 | 1, 2, 11, 22 | 4 | 36 | Composite |
| 23 | 1, 23 | 2 | 24 | Prime |
| 24 | 1, 2, 3, 4, 6, 8, 12, 24 | 8 | 60 | Composite · abundant |
| 25 | 1, 5, 25 | 3 | 31 | Composite · square |
| 26 | 1, 2, 13, 26 | 4 | 42 | Composite |
| 27 | 1, 3, 9, 27 | 4 | 40 | Composite |
| 28 | 1, 2, 4, 7, 14, 28 | 6 | 56 | Composite · perfect |
| 29 | 1, 29 | 2 | 30 | Prime |
| 30 | 1, 2, 3, 5, 6, 10, 15, 30 | 8 | 72 | Composite · abundant |
| 31 | 1, 31 | 2 | 32 | Prime |
| 32 | 1, 2, 4, 8, 16, 32 | 6 | 63 | Composite |
| 33 | 1, 3, 11, 33 | 4 | 48 | Composite |
| 34 | 1, 2, 17, 34 | 4 | 54 | Composite |
| 35 | 1, 5, 7, 35 | 4 | 48 | Composite |
| 36 | 1, 2, 3, 4, 6, 9, 12, 18, 36 | 9 | 91 | Composite · abundant · square |
| 37 | 1, 37 | 2 | 38 | Prime |
| 38 | 1, 2, 19, 38 | 4 | 60 | Composite |
| 39 | 1, 3, 13, 39 | 4 | 56 | Composite |
| 40 | 1, 2, 4, 5, 8, 10, 20, 40 | 8 | 90 | Composite · abundant |
| 41 | 1, 41 | 2 | 42 | Prime |
| 42 | 1, 2, 3, 6, 7, 14, 21, 42 | 8 | 96 | Composite · abundant |
| 43 | 1, 43 | 2 | 44 | Prime |
| 44 | 1, 2, 4, 11, 22, 44 | 6 | 84 | Composite |
| 45 | 1, 3, 5, 9, 15, 45 | 6 | 78 | Composite |
| 46 | 1, 2, 23, 46 | 4 | 72 | Composite |
| 47 | 1, 47 | 2 | 48 | Prime |
| 48 | 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 | 10 | 124 | Composite · abundant |
| 49 | 1, 7, 49 | 3 | 57 | Composite · square |
| 50 | 1, 2, 5, 10, 25, 50 | 6 | 93 | Composite |
| 51 | 1, 3, 17, 51 | 4 | 72 | Composite |
| 52 | 1, 2, 4, 13, 26, 52 | 6 | 98 | Composite |
| 53 | 1, 53 | 2 | 54 | Prime |
| 54 | 1, 2, 3, 6, 9, 18, 27, 54 | 8 | 120 | Composite · abundant |
| 55 | 1, 5, 11, 55 | 4 | 72 | Composite |
| 56 | 1, 2, 4, 7, 8, 14, 28, 56 | 8 | 120 | Composite · abundant |
| 57 | 1, 3, 19, 57 | 4 | 80 | Composite |
| 58 | 1, 2, 29, 58 | 4 | 90 | Composite |
| 59 | 1, 59 | 2 | 60 | Prime |
| 60 | 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 | 12 | 168 | Composite · abundant |
| 61 | 1, 61 | 2 | 62 | Prime |
| 62 | 1, 2, 31, 62 | 4 | 96 | Composite |
| 63 | 1, 3, 7, 9, 21, 63 | 6 | 104 | Composite |
| 64 | 1, 2, 4, 8, 16, 32, 64 | 7 | 127 | Composite · square |
| 65 | 1, 5, 13, 65 | 4 | 84 | Composite |
| 66 | 1, 2, 3, 6, 11, 22, 33, 66 | 8 | 144 | Composite · abundant |
| 67 | 1, 67 | 2 | 68 | Prime |
| 68 | 1, 2, 4, 17, 34, 68 | 6 | 126 | Composite |
| 69 | 1, 3, 23, 69 | 4 | 96 | Composite |
| 70 | 1, 2, 5, 7, 10, 14, 35, 70 | 8 | 144 | Composite · abundant |
| 71 | 1, 71 | 2 | 72 | Prime |
| 72 | 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72 | 12 | 195 | Composite · abundant |
| 73 | 1, 73 | 2 | 74 | Prime |
| 74 | 1, 2, 37, 74 | 4 | 114 | Composite |
| 75 | 1, 3, 5, 15, 25, 75 | 6 | 124 | Composite |
| 76 | 1, 2, 4, 19, 38, 76 | 6 | 140 | Composite |
| 77 | 1, 7, 11, 77 | 4 | 96 | Composite |
| 78 | 1, 2, 3, 6, 13, 26, 39, 78 | 8 | 168 | Composite · abundant |
| 79 | 1, 79 | 2 | 80 | Prime |
| 80 | 1, 2, 4, 5, 8, 10, 16, 20, 40, 80 | 10 | 186 | Composite · abundant |
| 81 | 1, 3, 9, 27, 81 | 5 | 121 | Composite · square |
| 82 | 1, 2, 41, 82 | 4 | 126 | Composite |
| 83 | 1, 83 | 2 | 84 | Prime |
| 84 | 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84 | 12 | 224 | Composite · abundant |
| 85 | 1, 5, 17, 85 | 4 | 108 | Composite |
| 86 | 1, 2, 43, 86 | 4 | 132 | Composite |
| 87 | 1, 3, 29, 87 | 4 | 120 | Composite |
| 88 | 1, 2, 4, 8, 11, 22, 44, 88 | 8 | 180 | Composite · abundant |
| 89 | 1, 89 | 2 | 90 | Prime |
| 90 | 1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 45, 90 | 12 | 234 | Composite · abundant |
| 91 | 1, 7, 13, 91 | 4 | 112 | Composite |
| 92 | 1, 2, 4, 23, 46, 92 | 6 | 168 | Composite |
| 93 | 1, 3, 31, 93 | 4 | 128 | Composite |
| 94 | 1, 2, 47, 94 | 4 | 144 | Composite |
| 95 | 1, 5, 19, 95 | 4 | 120 | Composite |
| 96 | 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 96 | 12 | 252 | Composite · abundant |
| 97 | 1, 97 | 2 | 98 | Prime |
| 98 | 1, 2, 7, 14, 49, 98 | 6 | 171 | Composite |
| 99 | 1, 3, 9, 11, 33, 99 | 6 | 156 | Composite |
| 100 | 1, 2, 4, 5, 10, 20, 25, 50, 100 | 9 | 217 | Composite · abundant · square |
Number of factors and sum of factors from the prime factorization
| Number | Prime factorization | Number of factors | Sum of factors |
|---|---|---|---|
| 12 | 2² × 3 | (2 + 1)(1 + 1) = 6 | (1 + 2 + 4)(1 + 3) = 7 × 4 = 28 |
| 36 | 2² × 3² | (2 + 1)(2 + 1) = 9 | (1 + 2 + 4)(1 + 3 + 9) = 7 × 13 = 91 |
| 60 | 2² × 3 × 5 | (2 + 1)(1 + 1)(1 + 1) = 12 | (1 + 2 + 4)(1 + 3)(1 + 5) = 7 × 4 × 6 = 168 |
| 100 | 2² × 5² | (2 + 1)(2 + 1) = 9 | (1 + 2 + 4)(1 + 5 + 25) = 7 × 31 = 217 |
| 360 | 2³ × 3² × 5 | (3 + 1)(2 + 1)(1 + 1) = 24 | (1 + 2 + 4 + 8)(1 + 3 + 9)(1 + 5) = 15 × 13 × 6 = 1170 |
| 1024 | 2¹⁰ | (10 + 1) = 11 | (1 + 2 + 4 + … + 1024) = 2047 |
| 5040 | 2⁴ × 3² × 5 × 7 | (4 + 1)(2 + 1)(1 + 1)(1 + 1) = 60 | (1 + 2 + 4 + 8 + 16)(1 + 3 + 9)(1 + 5)(1 + 7) = 31 × 13 × 6 × 8 = 19344 |
| 997 | 997 | (1 + 1) = 2 | (1 + 997) = 998 |
Common factors of two or three numbers
| Numbers | Common factors | Greatest common factor | Number of common factors |
|---|---|---|---|
| 12, 18 | 1, 2, 3, 6 | 6 | 4 |
| 24, 36 | 1, 2, 3, 4, 6, 12 | 12 | 6 |
| 48, 72 | 1, 2, 3, 4, 6, 8, 12, 24 | 24 | 8 |
| 30, 45 | 1, 3, 5, 15 | 15 | 4 |
| 35, 12 | 1 | 1 | 1 |
| 24, 36, 60 | 1, 2, 3, 4, 6, 12 | 12 | 6 |
| 18, 27, 45 | 1, 3, 9 | 9 | 3 |
| 84, 126, 210 | 1, 2, 3, 6, 7, 14, 21, 42 | 42 | 8 |
Highly composite numbers up to 10000
| Number | Prime factorization | Number of factors | Sum of factors |
|---|---|---|---|
| 1 | 1 | 1 | 1 |
| 2 | 2 | 2 | 3 |
| 4 | 2² | 3 | 7 |
| 6 | 2 × 3 | 4 | 12 |
| 12 | 2² × 3 | 6 | 28 |
| 24 | 2³ × 3 | 8 | 60 |
| 36 | 2² × 3² | 9 | 91 |
| 48 | 2⁴ × 3 | 10 | 124 |
| 60 | 2² × 3 × 5 | 12 | 168 |
| 120 | 2³ × 3 × 5 | 16 | 360 |
| 180 | 2² × 3² × 5 | 18 | 546 |
| 240 | 2⁴ × 3 × 5 | 20 | 744 |
| 360 | 2³ × 3² × 5 | 24 | 1170 |
| 720 | 2⁴ × 3² × 5 | 30 | 2418 |
| 840 | 2³ × 3 × 5 × 7 | 32 | 2880 |
| 1260 | 2² × 3² × 5 × 7 | 36 | 4368 |
| 1680 | 2⁴ × 3 × 5 × 7 | 40 | 5952 |
| 2520 | 2³ × 3² × 5 × 7 | 48 | 9360 |
| 5040 | 2⁴ × 3² × 5 × 7 | 60 | 19344 |
| 7560 | 2³ × 3³ × 5 × 7 | 64 | 28800 |
Perfect numbers: found by search and built with Euclid’s formula
| p | 2^p − 1 | Is 2^p − 1 prime? | Perfect number 2^(p−1) × (2^p − 1) | Proper factors add to | Found by search up to 10000 |
|---|---|---|---|---|---|
| 2 | 3 | 3 (prime) | 6 | 6 | Yes |
| 3 | 7 | 7 (prime) | 28 | 28 | Yes |
| 5 | 31 | 31 (prime) | 496 | 496 | Yes |
| 7 | 127 | 127 (prime) | 8128 | 8128 | Yes |
| 11 | 2047 | 23 × 89 (not prime) | None | — | — |
| 13 | 8191 | 8191 (prime) | 33550336 | 33550336 | No: above 10000 |
| 17 | 131071 | 131071 (prime) | 8589869056 | 8589869056 | No: above 10000 |
| 19 | 524287 | 524287 (prime) | 137438691328 | 137438691328 | No: above 10000 |
| 23 | 8388607 | 47 × 178481 (not prime) | None | — | — |
| 29 | 536870911 | 233 × 1103 × 2089 (not prime) | None | — | — |
| 31 | 2147483647 | 2147483647 (prime) | 2305843008139952128 | 2305843008139952128 | No: above 10000 |
Divisibility rules, tested on 2904
| Divisor | Rule | Test on 2904 | Divisible? |
|---|---|---|---|
| 2 | The last digit is 0, 2, 4, 6 or 8. | last digit 4 is even | Yes |
| 3 | The digits add up to a multiple of 3. | digits add to 2 + 9 + 0 + 4 = 15, a multiple of 3 | Yes |
| 4 | The last two digits form a multiple of 4. | last two digits 4, a multiple of 4 | Yes |
| 5 | The last digit is 0 or 5. | last digit 4 is not 0 or 5 | No |
| 6 | It is divisible by both 2 and 3. | divisible by 2 and divisible by 3 | Yes |
| 7 | Cut off the last digit, subtract twice it from the rest, and repeat: the result is a multiple of 7. | 290 − 2 × 4 = 282, then 28 − 2 × 2 = 24; 24 is not a multiple of 7 | No |
| 8 | The last three digits form a multiple of 8. | last three digits 904, a multiple of 8 | Yes |
| 9 | The digits add up to a multiple of 9. | digits add to 2 + 9 + 0 + 4 = 15, not a multiple of 9 | No |
| 10 | The last digit is 0. | last digit is 4, not 0 | No |
| 11 | Add and subtract the digits alternately, from the right: the result is a multiple of 11 (0 counts). | 4 − 0 + 9 − 2 = 11, a multiple of 11 | Yes |
| 12 | It is divisible by both 3 and 4. | divisible by 3 and divisible by 4 | Yes |
How to find all the factors of a number
- Type a whole number. Enter a positive whole number such as 60. Commas are fine (1,200). A minus sign is accepted: the factors of −60 are the factors of 60. Numbers up to 10^15 are instant, and the calculator also handles numbers up to 10^20.
- Read the list and the pairs. The list shows every factor in order: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 for 60. The factor pairs table shows each pair that multiplies to the number and its sum, such as 5 × 12 with a product of 60 and a sum of 17.
- Check the count, sum and type. The results show the number of factors (12), their sum (168), the sum of the proper factors (108), and whether the number is prime or composite, perfect, abundant or deficient, and a perfect square.
- Follow the working. The working splits the number into primes (2² × 3 × 5), then uses the exponents: (2 + 1)(1 + 1)(1 + 1) = 12. Every factor is a product of those primes with exponents from 0 up to each prime’s own.
- Switch to common factors if you need them. Choose common factors of 2 or 3 numbers and type, for example, 24, 36. The common factors are 1, 2, 3, 4, 6, 12, and the greatest is 12. To list the negative factors as well, tick include negative factors.
Frequently asked questions
- What are the factors of a number?
- The factors of a whole number are the whole numbers that divide it exactly, with no remainder. The factors of 60 are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60. Factors are also called divisors. Every number greater than 1 has at least two factors, 1 and itself, and a prime has no others.
- How do you find all the factors of a number?
- Divide the number by 1, 2, 3 and so on up to its square root, and every exact division gives a pair: for 60, 60 ÷ 1 = 60, 60 ÷ 2 = 30, 60 ÷ 3 = 20, 60 ÷ 4 = 15, 60 ÷ 5 = 12 and 60 ÷ 6 = 10 give the 6 pairs, and 7 is the whole part of the square root, so there is nothing more to check. The calculator does it differently for speed: it splits the number into primes (2² × 3 × 5) and builds every product of those primes, which gives the same 12 factors.
- How many factors does a number have?
- Write the number as a product of prime powers, add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5 that is (3 + 1)(2 + 1)(1 + 1) = 24, so 360 has 24 factors; for 60 it is (2 + 1)(1 + 1)(1 + 1) = 12. The sum of the factors is the product of 1 + p + … + p^e over the primes: 1170 for 360 and 168 for 60. A number has exactly two factors only if it is prime: 25 of the numbers from 1 to 100 are.
- What are factor pairs?
- A factor pair is two factors that multiply to the number: 60 has 6 pairs, 1 × 60, 2 × 30, 3 × 20, 4 × 15, 5 × 12, 6 × 10. Factor pairs are what you need to factor a quadratic: to write x² + 17x + 60 as a product, find the pair of 60 whose sum is 17, which is 5 × 12, so it is (x + 5)(x + 12). The sum of each pair is in the pairs table. A perfect square such as 36 has a pair made of one number twice (6 × 6), which is why it has an odd number of factors.
- What is the difference between factors and multiples?
- Factors divide the number and are never larger than it; multiples are what you get by multiplying it. The factors of 12 are 1, 2, 3, 4, 6, 12 and there are only 6 of them, while the multiples 12, 24, 36, 48 and so on never end. 12 is a multiple of each of its factors, and each of those is a factor of 12. For the smallest shared multiple, use the GCF and LCM calculator.
- What are the factors of 1, and of 0?
- The only factor of 1 is 1 itself (1 factor), and 1 is neither prime nor composite. Zero has no finite list: every nonzero whole number divides 0, so there is no set of factors to show, and the calculator says so instead of listing anything.
- Do negative numbers have factors?
- If a divides n, so does −a, because (−a) × (−n ÷ a) = n. Tick include negative factors and the factors of 12 become −12, −6, −4, −3, −2, −1, 1, 2, 3, 4, 6, 12: 12 has 12 factors: 6 positive and 6 negative. The positive factors are the ones usually meant, and the factors of a negative number such as −12 are the factors of 12; only the pairs change, because one number in each pair must be negative to multiply to −12.
- What is the difference between factors and prime factors?
- Factors are all the numbers that divide the number; prime factors are the prime ones among them, and multiplying them (with repeats) gives the number back. 60 has 12 factors (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60) but only three prime factors, 2, 3 and 5, because 60 = 2² × 3 × 5. The calculator shows the prime factorization in its working. For a factor tree and the next prime, use the prime factorization calculator.
- What are perfect, abundant and deficient numbers?
- Add the proper factors, the factors other than the number itself. If the total equals the number it is perfect: 1 + 2 + 3 = 6 for 6 and 1 + 2 + 4 + 7 + 14 = 28 for 28. If it is larger the number is abundant (12: 16 > 12), and if it is smaller the number is deficient (8: 7 < 8). Between 1 and 100 there are 2 perfect numbers (6 and 28) and 22 abundant ones, starting 12, 18, 20, 24, 30; all primes and prime powers are deficient. A search up to 10000 finds 4 perfect numbers: 6, 28, 496 and 8128.
- How do you find the common factors of two numbers?
- Find the greatest common factor, then list its factors: every common factor of the numbers divides their GCF, and every factor of the GCF divides all the numbers. For 24 and 36 the GCF is 12, so the common factors are the factors of 12: 1, 2, 3, 4, 6, 12. For 48 and 72 the GCF is 24 and there are 8 common factors. Numbers whose only common factor is 1 are called coprime. For the LCM and Euclid’s algorithm steps, use the GCF and LCM calculator.
- How can I tell from the factors whether a number is a perfect square?
- Factors come in pairs, one below the square root and one above, except when the number is a square, where the square root pairs with itself. So only perfect squares have an odd number of factors. Between 1 and 100 the numbers with an odd count are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100: exactly the squares. 36 has 9 factors, and the calculator’s perfect square row reads Yes (6² = 36).
- Which number has the most factors?
- No number has the most factors of all, because the count has no upper limit, but some numbers beat every smaller one. They are called highly composite. The search in the table above finds 20 of them up to 10000; the last is 7560 with 64 factors. Among the numbers 1 to 100 the most factors is 12, shared by 60, 72, 84, 90, 96.
- How do I know if a number is divisible by 2, 3, 5, 9 or 11 without dividing?
- Use the digits. A number is divisible by 2 if its last digit is even, by 5 if it ends in 0 or 5, by 3 or 9 if its digits add up to a multiple of 3 or 9, and by 11 if the alternating sum of its digits is a multiple of 11. For 2904 the digits add to 15, so it is divisible by 3 but not by 9, and it has 24 factors in all. The divisibility rules table above tests every rule from 2 to 12 on this number.
- How large a number can the factor calculator handle?
- Whole numbers up to 10^20 (100 quintillion), and common factors for numbers of up to 30 digits. Up to 10^15 the calculator tests divisors up to the square root, which takes at most about ten million steps and is instant. From 10^15 to 10^20 it divides out the primes below one million, then proves what is left prime with the Miller-Rabin test or splits it with Pollard’s rho method. For example it factors 2305843008139952128 as 2³⁰ × 2147483647 and finds that it is perfect. Above 10^20 it says that the number is out of range instead of guessing. Numbers with very many factors, such as the ones near 10^18, show the smallest and largest thousand and give the exact count.
How it works
A factor (divisor) of n is a positive whole number that divides n with no remainder. The calculator first writes n as a product of prime powers, n = p₁^e₁ × p₂^e₂ × …. Every factor is a product of those primes with each exponent from 0 up to its own, so the number of factors is (e₁ + 1)(e₂ + 1)… and the sum of the factors is the product of (1 + p + … + p^e) over the primes. The proper factors are all factors except n; their sum s(n) decides the class: perfect if s(n) = n, abundant if s(n) > n, deficient if s(n) < n. A number is prime if it has exactly two factors, composite if it has more, and 1 is neither. Factor pairs are (d, n ÷ d) for each factor d with d × d ≤ n, shown with their product and sum. Common factors of two or three numbers are the factors of their greatest common factor, found with Euclid’s algorithm; each number is also factored on its own when it is within range. Arithmetic is exact (BigInt). Factoring: numbers up to 10^15 are split by trial division by 2, 3 and then by numbers of the form 6k ± 1 up to the square root, in ordinary arithmetic, which is exact because every value is below 2^53. From 10^15 up to 10^20 the primes below 10^6 are divided out first; what remains has no prime factor below 10^6, so it is prime if it is below 10^12, and otherwise the Miller-Rabin test with the first 13 prime bases decides (with these bases it gives exact answers, not probabilities, for every number in this range) and Brent’s variant of Pollard’s rho splits composites, within a fixed step budget; if the budget ran out the page would say so rather than show a partial list. Numbers above 10^20 are not factored. Conventions: the sign of the input is ignored for the factor list (the factors of −12 are those of 12; the pairs of −12 have one negative member); “include negative factors” adds −d for each factor d; 0 has no finite set of factors and is refused; the list shows at most 2,000 factors (the smallest 1,000 and the largest 1,000 when there are more), and the factor pairs table shows at most 60 pairs, but the count and the sum always cover every factor. The reference tables are computed when the page is built: factors of 1 to 100 by the calculator’s own analysis; highly composite numbers (more factors than any smaller number) and perfect numbers by a sieve that counts and sums the factors of every number up to 10000; Euclid’s perfect numbers 2^(p−1) × (2^p − 1) for the primes p up to 31, using the calculator to test whether 2^p − 1 is prime and to check that each result is perfect; the divisibility rules by code that the unit tests compare with the remainder for thousands of numbers.
Sources
- Divisor, Wikipedia
- Divisor function (number and sum of divisors), Wikipedia
- Perfect number and the Euclid-Euler theorem, Wikipedia
- Highly composite number, Wikipedia
- Divisibility rule, Wikipedia
- Miller-Rabin primality test, Wikipedia
- Pollard’s rho algorithm, Wikipedia
- A002182: highly composite numbers, OEIS
- A000396: perfect numbers, OEIS
More free tools
- Long Division CalculatorLong division with remainder and the decimal worked out step by step, the repeating block marked (1/7 = 0.(142857)). Exact for decimals and big numbers.
- Factorial CalculatorCalculate n! exactly for any n up to 10,000: digit count, first and last digits, trailing zeros, n!!, subfactorial !n and Stirling’s approximation.
- Ratio CalculatorSimplify a ratio like 12:18 to 2:3, scale it up or down, compare two ratios, turn it into fractions and percentages, or split a total such as 500 in 3:2.
- Prime Number CheckerTest whether a number up to 3.3 × 10^24 is prime, find the next and previous prime, list primes in a range, count primes up to N, and see twin primes.
- Fibonacci CalculatorFind F(n) exactly for n up to 10,000, list the first N terms, test whether a number is Fibonacci, get its index, the sum of terms and the golden ratio.
- Modulo CalculatorFind a mod n for any integers up to 200 digits, with floor and truncated remainders side by side, plus congruence, aᵇ mod n and the modular inverse.
More: Algebra and number theoryAll math & numbersAll toolsHome & DIY calculators