Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to find out the most divisible numbers using the divisibility rules from 2-12, but i'm getting lost. Is there any online calculator that given a range of numbers(for me would be 2-12) will output the highest divisible numbers?

Edit: Okay, fair enough. I'll explain more about my idea here. The thing is that i'm want to find the 'right' number for a CSS grid system that I'm working on. The is the most famous one. But as you can tell the maximum width for the grid is 960pixel. Which was ok 5 years ago, but nowadays a lot of people have computers with big screen. I want to push forward. Another one is this one is good too. It is divisible by 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120. Those are the numbers that i'm looking for.

For example, how do I which numbers can divide 1008 or 1024..and so on.

I hope this make sense now.

share|cite|improve this question
Do you mean finding the gcd of two numbers? Can you explain a little bit more about what you mean by higher divisibility. –  Amateur Math Guy Feb 5 '13 at 12:59
Perhaps the OP meant the number with the most divisors? Mistery... –  DonAntonio Feb 5 '13 at 13:25

4 Answers 4

up vote 7 down vote accepted

You might check out OEIS on highly composite numbers. $840$ has $32$ factors, while $960$ has only $28$, but maybe the $7$ isn't so useful. The next record holder is $1260$ with $36$ factors. It isn't too much larger than $1080$, which has $32$ like $840$ did.

share|cite|improve this answer
I followed the link, but I couldn't find where did you get the factors from? –  Daniel Feb 5 '13 at 14:26
I used Wolfram Alpha to get the factorization, then used the formula given by Rich Decker. Alternately you can go to the next entry of OEIS and match them up. That won't help with $960$ as it is not in the list. –  Ross Millikan Feb 5 '13 at 14:51
Great. Question answered! –  Daniel Feb 5 '13 at 14:59

I'll interpret your question as "What numbers in the range $2,\dots,12$ have the most divisors?" A useful result here is that if you express a positive integer as a product of primes, $$ n=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k} $$ then the number of positive integers that divide $n$ will be $$ (a_1+1)(a_2+1)\cdots(a_k+1) $$ For example, if $n=40=2^35^1$, then $n$ will have eight divisors, namely $$ 1, 2, 4, 5, 10, 20, 40 $$ It's not hard to see how this result is derived; a divisor of $p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$ will have to be of the form $p_1^{b_1}p_2^{b_2}\cdots p_k^{b_k}$ where $b_i\le a_i$ for $i=1, \dots, k$, so there will be $a_1+1$ possibilities for $b_1$ (namely $0, 1, \dots,a_1$) and regardless of those choices there will be $a_2+1$ choices for how many of the $p_2$ appear, and similarly for the other choices for the $b$s.

For your problem, it's easy to produce the prime factorizations of the numbers between $2$ and $12$: $$ \begin{array}{lccccccccccc} \mathbf{n} & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12\\ \mathbf{divisors} & 2 & 2 & 3 & 2 & 4 & 2 & 4 & 3 & 4 & 2 & 6 \end{array} $$ so in this case, $12$ will have the most divisors: $1, 2, 3, 4, 6, 12$.

share|cite|improve this answer

How can there be a discussion of this without mentioning Ramanujan's pioneering 1915 paper “Highly Composite Numbers”?

A good summary of this paper and more recent related work can be found at

A related paper by Erdos is at

I was not able to find the original paper via Google.

share|cite|improve this answer

It actually sounds like you want the least common multiple of the integers 2 through 12. That would certainly make sense if you're designing a grid system! It would guarantee you the ability to divide the grid into any number of cells up to $12$.

Going through prime factors, we have $$\mathrm{lcm}(2,\ldots,12)=2^3\times 3^2\times5\times7\times11=27720.$$

Ouch! That's pretty large. We're going to have to drop support for $11$: $$\mathrm{lcm}(2,\ldots,10)=2^3\times 3^2\times5\times7=2520.$$

Still too large. We have to drop support for $9$ as well: $$\mathrm{lcm}(2,\ldots,8)=2^3\times 3\times5\times7=840.$$

For more on these numbers, check out

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.