About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
October 2024 - Solution
October 2024 Solution:
The numerical solutions are
X = 1817198712146313216, A = 1817198712, B = 146313216 X = 8419411123272236924928, A = 84194111232, B = 72236924928
The solution is based on a search, which can be optimized in various ways. We give the method
described by Alex Izvalov (thanks, Alex!):
- As the number
should contain all the digits
at least once, and
is the product of digits of
, then
Ifis a perfect square, then it should be in the form:
, where
are natural numbers
To search for
in the (almost) increasing order we'll loop through the sum of
and then we'll loop a from
to
from
to
, and then
Next we should check if
contains digits
or
and we'll proceed to the next cycle iteration in this case
As
is a multiple of
, then (let
be the length of
)
is a multiple of
, then prime factoring of
should have as many 3s and 7s as
has, and the number of 2s should be not less than the number of 2s in
minus the length of
. We'll call the minimal number consisting of these prime factors,
As now we know the product of digits of
, and we know
, we'll know the product of digits of
, too (and for the advanced problem we can break the loop early if it's not a perfect cube).
We'll use several tactics to reduce the field of search.
Then we can proceed in 2 directions: either search for as a multiple of
and loop through
and then check the digits, or construct
as a number of gradually increasing length which product of numbers should be equal to
, and then check if it's a multiple of
.
I found the first, more straightforward way, easier to use when searching for the candidates
for the minimal X, and the second way to prove that the results are indeed minimal.