Oddly Divisible

Algebra Level 3

Let x x be a three-digit integer, s s be the sum of its digits, and p p be the product of its digits. And that

  • x x is divisible by s s and p p .
  • p p is divisible by s s .
  • p p and s s are odd numbers.

What is x x ?


The answer is 735.

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.

3 solutions

Fletcher Mattox
Oct 12, 2020

Feeling redundant this morning. :)

1
2
3
4
5
6
7
from numpy import prod

for n in range(100, 1000):
    s = sum(list(map(int, list(str(n)))))
    p = prod(list(map(int, list(str(n)))))
    if n%2 == 1 and p != 0 and n%p == n%s == p%s == 0:
        print(n)

1
735

Chew-Seong Cheong
Oct 12, 2020

Since brutal force seemed inevitable, I used Python coding to solve it.

The third condition indicated that all three digits of x x are odd, so it narrowed down the search to 125 125 numbers.

The first and second showed that x x must be a composite number thus the searching list is now only 82 82 numbers.

Using logic and a trick called brute force, we have the answer is 735 \blue{\boxed{735}} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...