# Riddlers for 4 May 2018

Spoilers for last week’s fivethirtyeight.com Riddler Express and Classic:

# Express

From Charlie Drinnan, find the letters’ numbers:

If A, B, C, D and E are all unique digits, what values would work with the following equation?

ABC,CDE × 4 = EDC,CBA

No problem. $A$ must be even, and $4A < 10$, so $A=2$. Then $4AB < 100$ so $B < 5$, and $BA\mod 4 = 0$ so $B = 1$ and $E = 8$, or $B = 3$ and $E = 9$. But $4E \mod 10 = A = 2$ so $E = 8$.

Now $4D+3 \mod 10 = B = 1$ so $4D \mod 10 = 8$. $D\ne 2$ so $D = 7$.

Finally $4C+3 \mod 10 = C$ or $3C\mod 10 = 7$, so $C = 9$.

$219,978 \times 4= 879,912$.

# Classic

This is fairly mechanical although I tripped up several times on the way.

Let $n_i$ be the number of coconuts found by the $i$th pirate, and $n_8$ be the number of coconuts found in the morning. $n_8$ is divisible by 7 so write $n_8 = 7m_8$.

But $n_8$ is what was left when the seventh pirate discarded one coconut out of $n_7$ and hid one seventh of the rest, so $n_7 = (7/6)n_8+1 = (7/6)(7m_8)+1$. For that to be an integer $m_8$ must be a multiple of 6, so write $m_8 = 6m_7$. Then $n_7 = 7^2m_7+1$.

Now $n_6 = (7/6)n_7+1 = (7/6)(7^2m_7+1)+1$. For integer value, $7^2m_7\mod 6 = m_7\mod 6 = 5$, so write $m_7 = 6m_6+5$. Then $n_6 = (7/6)(7^2(6m_6+5)+1)+1 = 7^3m_6+288$.

You see how this goes.

$n_5 = (7/6)n_6+1 = (7/6)(7^3m_6+288)+1$. For integer value, $m_6\mod 6 = 0$, so write $m_6 = 6m_5$. Then $n_5 = (7/6)(7^3(6m_5)+288))+1 = 7^4m_5+337$.

$n_4 = (7/6)n_5+1 = (7/6)(7^4m_5+337)+1$. For integer value, $m_5\mod 6 = 5$, so write $m_5 = 6m_4+5$. Then $n_4 = (7/6)(7^4(6m_4+5)+337)+1 = 7^5m_4+14400$.

$n_3 = (7/6)n_4+1 = (7/6)(7^5m_4+14400)+1$. For integer value, $m_4\mod 6 = 0$, so write $m_4 = 6m_3$. Then $n_3 = (7/6)(7^5(6m_3)+14400)+1 = 7^6m_3+16801$.

$n_2 = (7/6)n_3+1 = (7/6)(7^6m_3+16801)+1$. For integer value, $m_6\mod 6 = 5$, so write $m_3 = 6m_2+5$. Then $n_2 = (7/6)(7^6(6m_2+5)+16801)+1 = 7^7m_2+705888$.

$n_1 = (7/6)n_2+1 = (7/6)(7^7m_2+705888)+1$. For integer value, $m_2\mod 6 = 0$, so write $m_2 = 6m_1$. Then $n_1 = (7/6)(7^7(6m_1)+705888)+1 = 7^8m_1+823537$. The smallest value corresponds to $m_1 = 0$ so $n_1^{min} = 823537$.

These pirates were either very sleepy, or incredibly quick at counting coconuts.