7
$\begingroup$

I have 7 numbers that add up to the same value as the sum of the base 1000 digits of the product.

Here are the numbers:

86, 203, 296, 395, 401, 407, 913

The first part of the puzzle is to understand and explain and prove the claim.

The second part of the puzzle is to construct all alternative sets of 7 values that have the same claimed property, which differ in only one of the numbers.

What is the new sum?

Edit:

Or rather, what are the new sums and their total?

$\endgroup$
2
  • $\begingroup$ I'm interested in mathematical as well as computational approaches. $\endgroup$
    – David
    Commented Feb 3, 2023 at 13:21
  • $\begingroup$ I had only checked 3 digit replacement values, and in my mind that is what the question was and had a unique solution. But I hope the update to the question will provide a satisfying answer. $\endgroup$
    – David
    Commented Feb 4, 2023 at 8:46

3 Answers 3

9
$\begingroup$

Verification:

$$86+203+296+395+401+407+913 = 2701\\86\times 203\times 296\times 395\times 401\times 407\times 913 = 304,153,525,784,175,760\\ 304+153 +525 +784 +175 +760 = 2701$$ The product is split into sets of three-digit numbers, which can be considered to be the base 1000 digits. These indeed have the same sum as the original numbers.

To find alternatives, we need use the following insight:

The sum of the digits a number in base $b$ has the same remainder in a division by $b-1$ as the original number. This is well known in decimal, where checking for divisibility by 9 is done by summing the digits and checking that smaller number instead.
So in base 1000, summing the digits does not change its remainder modulo 999.

In this particular case that means

$$86+203+296+395+401+407+913 \equiv 703\bmod 999\\86\times 203\times 296\times 395\times 401\times 407\times 913 \equiv 703 \bmod 999 $$

Now let's use that fact to find an alternative set. Suppose we try to change the first number.

$$x+203+296+395+401+407+913 \equiv x\cdot 203\cdot 296\cdot 395\cdot 401\cdot 407\cdot 913 \bmod 999\\x+617 \equiv x\cdot 740 \bmod 999\\739x \equiv 617 \bmod 999$$ $x\equiv86$ is only solution since $739$ coprime to $999$.
We could therefore try $86+999$, and that indeed works, with sum 3700. Adding larger multiples of $999$ fails, as the original sum eventually becomes larger than the sum derived from the product, since the latter's terms are restricted to 3 digits.

Let's see what would happen if we tried to change any of the other numbers.

Clearly we could try adding (multiples of) 999 to each number in turn. For more interesting alternative solutions, we need that final coefficient of $x$ to share a factor with $999=3^3\cdot 37$. That coefficient is one less than the product of the unchanged numbers modulo $999$:
$203*296*395*401*407*913 -1\equiv 739$
$86*296*395*401*407*913 -1\equiv 406$
$86*203*395*401*407*913 -1\equiv 295$
$86*203*296*401*407*913 -1\equiv 628$
$86*203*296*395*407*913 -1\equiv 73$
$86*203*296*395*401*913 -1\equiv 850$
$86*203*296*395*401*407 -1\equiv 258 = 3\cdot 86$
None have a factor $37$, and only the last one has a factor $3$. Therefore only changing the last factor might give this other type of solution.

$$86+203+296+395+401+407+x \equiv 86\cdot 203\cdot 296\cdot 395\cdot 401\cdot 407\cdot x\\789+x \equiv 259x \bmod 999\\258x \equiv 789 \bmod 999\\86x \equiv 263 \bmod 333\\x \equiv 247 \bmod 333$$
So instead of adding multiples of 999, which is all we can do with the other numbers, on this last number we can add/subtract multiples of 333. Therefore the candidates for replacing the last number are $247$, $580$, $913$, $1246$, $1579$, $1912$, ...
As before, not all of these candidates will work. The product and sum will be the same modulo 999, but they need not be outright equal as they could differ by a non-zero multiple of 999. We therefore have to check which of these candidates works.

Let's check some of these candidate solutions:

$86+203+296+395+401+407+247 = 2035$
$86\cdot203\cdot296\cdot395\cdot401\cdot407\cdot247 = 82,284,688,793,747,440$
$82+284+688+793+747+440 = 3034$
So $440$ does not work.

$86+203+296+395+401+407+580 = 2368$
$86\cdot203\cdot296\cdot395\cdot401\cdot407\cdot580=193,219,107,288,961,600$
$193+219+107+288+961+600 = 2368$
Success! $580$ works. This is the only alternative solution where the number is no more than 3 digits.
Next is $913$, which is the original number.
The next number, $1246$, also works, with sum 3034.
Then $1579$ fails, but $1912$ works with sum 3700.
It turns out that after that, the two sums start to diverge too much and never again become equal.

Here is a list of all solutions I have found:

86+203+296+395+401+407+913 = 2701 (Original set)
1085+203+296+395+401+407+913 = 3700
86+1202+296+395+401+407+913 = 3700
86+203+1295+395+401+407+913 = 3700
86+203+296+395+401+407+580 = 2368 (Only 3-digit alternative)
86+203+296+395+401+407+1246 = 3034
86+203+296+395+401+407+1912 = 3700

$\endgroup$
6
  • $\begingroup$ Beat me to it. One small economy that avoids having to evaluate all those tedious products a1...^ak...a7. Two of the ai are multiples of 37 therefore a1...^ak...a7 - 1 can never be. And all except a7 are 2 mod 3, a7 is 1 mod 3, so k=7 is indeed the only option for a1...^ak...a7 - 1 to share a factor with 999. $\endgroup$
    – loopy walt
    Commented Feb 3, 2023 at 15:45
  • $\begingroup$ "It turns out that after that, the product starts to get too large so that the sum of its base 1000 digits exceeds the original sum." This seems wrong, e.g. add 86*10^99 to 86 and the sum will increase with 86*10^99 while the digit sum will only double $\endgroup$
    – Retudin
    Commented Feb 3, 2023 at 15:45
  • $\begingroup$ @Retudin I agree that there is no guarantee that the base 1000 digits of the product don't suddenly become small, allowing for another solution. From observation, as you increase one of the numbers of the set, the two sums tend to get further apart, but I don't know how to prove that or establish an upper bound for the search. $\endgroup$ Commented Feb 3, 2023 at 16:09
  • $\begingroup$ I fixed the list of solutions, as I had accidentally used the wrong set of numbers to generate them. By computer I checked 10 million candidates for each number of the set and found no other solutions, so unless these numbers were especially cleverly chosen, this should be all of them. $\endgroup$ Commented Feb 3, 2023 at 17:04
  • 1
    $\begingroup$ that was overkill :-) Reasoning: (ignoring the +333solutions here) The product is 6 'digit' number with total 2701. A 6 'digit' number can be 5994 at most i.e. up to 3 times 999 can be added while in 6 'digit' range. A 4th time adding 999 requires a 7 'digit' number of at least 703 999 999 999 999 999 999. This won't work; even when added to the smallest number 86 the product is only 14x1000^6 $\endgroup$
    – Retudin
    Commented Feb 3, 2023 at 17:17
4
$\begingroup$

First part is quite easy to verify:

$86 + 203 + 296 + 395 + 401 + 407 + 913 = 2701$ $86 × 203 × 296 × 395 × 401 × 407 × 913 = 304.153.525.784.175.760$

And if we sum the digits of this product by taking them in slice of 3 (base 1000 digit of the product)

$304 + 153 + 525 + 784 + 175 + 760 = 2701$, which matches the first sum of numbers

2nd part is another story....

After some computing, we found that we can replace every number by

this number $ + 999$

the new sum is the previous $+ 999$ (3700 then)

But I don't have the mathematical proof

Some others solutions

replacing 913 by 580 (new sum = 2368)

replacing 913 by 1246 (new sum = 3034)

$\endgroup$
1
  • 1
    $\begingroup$ I spoke a bit fast, seems to be wrong for 395, 401, 407.... but true for 86, 203, 296, 913! $\endgroup$ Commented Feb 3, 2023 at 14:41
2
$\begingroup$

Let the numbers be $N=\{a,b,c,d,e,f,g\}$ where $\max(N)=g$. We impose

$$S_\text{left}=a+b+c+d+e+f+g=\sum_{i=0}^\infty\mathrm{mod}\left(\frac{abcdefg}{1000^i},1000\right)=S_\text{right}.$$ Now $S_\text{left}\geq g$. If $g^7$ has $n$ digits, then $S_\text{right}\leq999\left\lceil\frac n3\right\rceil$. So for $g\geq10000$, $S_\text{right}\leq999\left\lceil\frac{\log_{10}g^7}3\right\rceil<g\leq S_\text{left}$, and no solutions exist.

The requirement that only one number differs makes this problem very easy. We'll replace 86 with every number from 1 to 9999, then try replacing 203 with 1...9999, etc. Here's Mathematica code

DeleteCases[Select[Join @@ Table[
  ReplacePart[{86, 203, 296, 395, 401, 407, 913}, j -> i], 
{i,9999},{j,7}], 
Plus @@ # == Plus @@ IntegerDigits[Times @@ #, 1000] &],
{86, 203, 296, 395, 401, 407, 913}]

It yields the following solutions

{86, 203, 296, 395, 401, 407, 580 }, sum=2368,
{86, 203, 296, 395, 401, 407, 1246}, sum=3034,
{86, 203, 296, 395, 401, 407, 1912}, sum=3700,
{86, 203, 1295, 395, 401, 407, 913 }, sum=3700,
{86, 1202, 296, 395, 401, 407, 913 }, sum=3700,
{1085, 203, 296, 395, 401, 407, 913 }, sum=3700

Those should be the only ones that differ from your example in exactly one place. It's interesting that many of them sum to a particular value. Searching for arbitrary sets $N$ yields thousands of solutions (where my loose upper bound on the total amount is around $10^{23}$).


The code to verify that a particular set works is

Plus@@#==Plus@@IntegerDigits[Times@@#,1000]&@ {86,203,296,395,401,407,913}

which produces True.

$\endgroup$
1
  • $\begingroup$ This is very neat so +1, but have you answered all the question? $\endgroup$
    – David
    Commented Feb 4, 2023 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.