8
$\begingroup$

Five positive integers should be put in a row such that each integer is the sum of the digit sum of its neighbours.

The integers at the beginning and at the end have only one neighbour, i.e the first integer is the digit sum of the second integer, the fifth integer is the digit sum of the fourth integer.

What is the smallest sum of those five integers?

$\endgroup$
0
9
$\begingroup$

Smallest sum is

45

Solutions are

1 10 9 17 8
2 11 9 16 7
3 12 9 15 6
...
8 17 9 10 1

Reasoning

Let a b c d e be a solution. Then (writing [] for digit sum) c = a + e = [b] + [d]. Also, b = 2[b] + [d] and d = [b] + 2[d]. Therefore b and d must be multidigit. The smallest possible way is b = 10 + B and d = 10 + D where B = a - 1 and D = e - 1 are single digit. From this it follows that c = a + e = 9.

$\endgroup$
2
  • $\begingroup$ There's a hole in your logic; those aren't all the solutions. It misses the solution of "9 18 18 18 9". $\endgroup$ Jul 19 at 21:46
  • 3
    $\begingroup$ @ralphmerridew 9 18 18 18 9 is not a minimal solution. It sums to 72. $\endgroup$
    – loopy walt
    Jul 19 at 23:04
4
$\begingroup$

This should be optimal.

1 10 9 17 8

2 11 9 16 7

3 12 9 15 6

4 13 9 14 5

In each case, the sum is 45.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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