Number with largest number of divisors

  • Among { 1 , 2 , , 11 , 12 } , \left\{1,2,\ldots,11,12\right\}, 12 12 has largest number of divisors.
  • Among { 1 , 2 , , 23 , 24 } , \left\{1,2,\ldots,23,24\right\}, 24 24 has largest number of divisors.
  • Among { 1 , 2 , , 35 , 36 } , \left\{1,2,\ldots,35,36\right\}, 36 36 has largest number of divisors.

Which number in the set { 1 , 2 , , 2017 , 2018 } \left\{1,2,\ldots,2017,2018\right\} has the largest number of divisors?


The answer is 1680.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

We know from the Fundamental Theorem of Arithmetic that any composite number can be constructed from a unique key of primes. The amount of ways these primes can be combined in gives the amount of divisors for the number they generate. Let's explore some initial keys:

  • The longest prime key containing duplicates is 2 10 = 1024 2^{10}=1024 . It is composed from 10 primes and has 11 divisors total: { 1 , 2 , , 1024 } \{1, 2, \ldots, 1024\} .
  • The longest prime key that doesn't contain duplicates consists of 4 prime numbers. The smallest one possible is 2 3 5 7 = 210 2*3*5*7=210 and it has 15 divisors.

I didn't find a general pattern for finding the combination of primes that gives the largest amount of divisors so I just narrowed down the possibilities by altering the initial 2 10 2^{10} expression and counting the combinations:

  • 2 9 3 1 = 1536 2^9*3^1=1536 gives 21 combinations. Trading 2 2 2^2 for 3 the key becomes:
  • 2 7 3 2 = 1152 2^7*3^2=1152 gives 25 combinations. Trading 2 for 3:
  • 2 6 3 3 = 1728 2^6*3^3=1728 gives 29 combinations. Trading 2 2 2^2 for 3:
  • 2 4 3 4 = 1296 2^4*3^4=1296 gives 26 combinations. Divisor count won't get any higher than 29 for the key consisting of multiples of two primes. Adding a new prime:
  • 2 3 3 3 5 = 1080 2^3*3^3*5=1080 gives 33 combinations. Adding a new prime:
  • 2 4 3 5 7 = 1680 2^4*3*5*7=1680 gives 41 combinations.

At this point new primes cannot be added without removing all instances of any other prime already present in the key. This guarantees both that this is the key that gives the most divisors and that it is also the largest integer in the set.

The correct answer is then 1680.

Completely computational approach gives D = 40 D = 40 divisors for the number N = 1680 N = \boxed{1680} . Here is the code:

1
2
3
4
5
for n = 1:2018
    k  = 1:n ;
    s0(n) = size( k( rem(n,k)==0 ), 2 ) ;
end
[D,N] = max(s0)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...