omega function question - junior maths test

386 Views Asked by At

I was going over some old maths competition questions for primary school children. The hardest question on the paper was this...

The number $2000 = 2^4 \times 5^3$ is the product of seven prime factors. Let x be the smallest integer greater than 2000 with this property and y be the largest integer smaller than 2000 with this property. What is the value of x - y?

I know this has to do with the $\Omega(n)$ function. I guess I know

  • $\Omega(x) = 7$
  • $\Omega(y) = 7$
  • $x > 2000$ and
  • $y < 2000$

Other than that I have absolutely no idea how to solve this other than to write an algorithm.

Any suggestions would be greatly appreciated. Thanks in advance.

1

There are 1 best solutions below

2
On BEST ANSWER

I don't know of an elegant way to find the answer, but let me present the answer for reference.

I used brute force. Factorizing the integers $1999$, $1998$, and so on, we find that the largest integer less than $2000$ that has exactly seven prime factors is $1984=2^6\times 31$. Factorizing the integers $2001$, $2002$, and so on, we find that the smallest integer greater than 2000 that has exactly seven prime factors is $2080=2^5\times 5\times 13$. (Note that $2016=2^5\times 3^2\times 7$ has exactly eight prime factors, and that $2048=2^{11}$ has exactly eleven prime factors.)

Thus, $x=2080$, $y=1984$, and $x-y=96$.