Searching specific numbers based on clues

115 Views Asked by At

"Find x for 0≤x≤100,000."

My clues are as following. I'm not sure whether there are multiple answers or that only one 'x' remains based on these clues:

  • This number isn’t between 20,000 and 40,000 or 60,000 and 80,000.

  • This number is divisible by three values between 10 and 50.

  • The sum of the prime factors of this number is 53. (20 would be 2+2+5=9).

  • Digits multiply up to 0. (So one of the digits is 0)

  • This number is odd.

2

There are 2 best solutions below

3
On

Concerning the 2nd statement, it says that the number is divisible by three values between 10 and 50. But is it exactly 3 values?

If not, then to date I found 3 such numbers exist,namely $5083$, $4807$ and $85085$.

For $5083$,

1st statement is valid as $0<5083<20000$

2nd statement is valid as $5083=13\cdot17\cdot23$

3rd statement is valid as $13+17+23=53$

4th statement is valid as $5\cdot0\cdot8\cdot3=0$

5th statement is valid as $5083$ is odd.

And similiar for $4807$

Similiar for $85085$,

2nd statement is valid as $85085=5\cdot7\cdot11\cdot13\cdot17$ (if more than 3 prime factors are allowed)

3rd statement is valid as $5+7+11+13+17=53$

For statement 1,4,5, you can easily see that their validity.


Methodology

As what I've typed in the comment section, that the sum of prime number is 53 have those combinations mentioned. Among the 3-prime-factor-sum, only 3 of them can constitute 3 factors which is between 10 and 50. They are $(11,13,29)(11,19,23)(13,17,23)$. And their product are $4147,4807$ and $5083$ respectively. And $4147$ is not the answer as it doesn't have a "0".

Among the 4-prime-factor-sum, one can discover all these combinations consist of a "2". But then products of these prime factors,that are, the number to be found, are even, and not odd, so they are excluded from consideration. Fortunately, for the combination $(5,7,11,13,17)$ does not consist of a "2" and can fit all the requirements.

1
On

One thing seems not to be particularly clear to me. At the second point, is it allowed that a number can be divisible by more then 3 numbers between 10 and 50? I assume this is the case. I didn't found an easy solution to this problem, so here is a little Python program, which does the job:

#!/usr/bin/env python
from itertools import combinations

p = []
primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53]

# Find all the prime factorisations, who sum up to 53:
tup = [comb for i in range(1,20) for comb in combinations(primes, i) if sum(comb) == 53]

# Multiply the elements in the primefactorisations, so that we get a list of
# feasable numbers:
for elem in tup:
    x = 1
    for d in elem:
        x *= d
    p.append(x)

# Remove the elements, which are not in the specified range, or are even:
pc = p[:]
for x in pc:
    if (x > 20000 and x < 40000) or (x > 60000 and x < 80000) or x % 2 == 0:
        p.remove(x)

# Remove the elements, which do not contain the digit 0:
pc = p[:]
p = []
for x in pc:
    ch = str(x)
    for c in ch:
        if (c == '0'):
            p.append(x)
            break

# Find the number, which is divisable by at least three values between 10 and 50:
pc = p[:]
p = []
for x in pc:
    c = 0
    for i in range(11,51,2):
        if x % i == 0:
           c += 1

    if c >= 3:
        p.append(x)

# Print the result:
print(p)

If you let this program run, it will display the following result:

[4807, 5083, 57057, 85085]