Find the smallest number with exactly N divisors

Let's say we have a number of divisors N. And I want to find a minimum numberthat has N divisors.

My algorithm

  • I found prime numbers (pm = [2,3,5,7, ..])
  • I found N prime coefficients (N = 12, p = [2,2,3], inverse p rp = [3, 2, 2])
  • number * = pm[i]^(rp[i]-1), i = 1 ... length of simple coefficients

For N = 12, the answer 60 = 2^(3-1) * 3^(2-1) * 5^(2-1)

But for the number 243, my algorithm gives the wrong answer (5336100 - but this is not the minimum number that has 243 divisors). The expected number 2822400.

Where is my fault? Any literature?

+4
source share
2 answers

OEIS. .

enter image description here

? , :

enter image description here

, , , . , , , , .

m_i, , m_i m_i . , m1 = 2, m2 = 5, m3 = 2, 2^5 * 3^2 * 5^2.

+6

:

, N (m i + 1), m i, N, 1 .

, N = 243. 243

243 = 3*3*3*3*3

,

2^2 * 3^2 * 5^2 * 7^2 * 11^2 = 5336100

243

243 = 9*3*3*3

,

2^8 * 3^2 * 5^2 * 7^2 = 2822400

, 2 ^ 6 11 ^ 2. , . , .

+4

Source: https://habr.com/ru/post/1623501/


All Articles