# Number Systems or Analytical Thinking

I have a paradox: EIGHTY is a six digit number with no repeating digits and no zeros. When divided by 19, 17, 13, 11, or H, the remainders are, respectively, 17, 13, 11, 7 and G.

TWENtY is (another) six digit number with no repeating digits and no zeros (and uses a different key to EIGHTY above). When divided by T, perfect square WE or perfect cube NtY, the remainder is zero.

Find EIGHTY TWENtY

My interpretation is: The question requires a fractional base system converion e.g. 20 converted to base 2 is and 0010100 and 20 converted to base 1.6 is approximately 1001001.2589 which is a six digit number but both have repeating digits and zeros.

EIGHTY is a six digit number with no repeating digits and no zeros. When divided by 19, 17, 13, 11, or H, the remainders are, respectively, 17, 13, 11, 7 and G.

So EIGHTY + 2 is divisible by both 19 and 13, while EIGHTY + 4 is divisible by both 17 and 11. So EIGHTY is congruent to -2 modulo 19*13=247, and congruent to -4 modulo 17*11=187. Solving these two simultaneous congruences using the Chinese Remainder Theorem, we get that EIGHTY is congruent to -26184 modulo 247*187=46189. The only 6-digit numbers satisfying this congruence and having no repeating digits and no zeros are 389517 and 943785. The first of these leaves a remainder of $2\neq G$ on division by $H=5$, while the second leaves a remainder of $3=G$ on division by $H=7$. So the answer is:

EIGHTY = 943785; E=9, I=4, G=3, H=7, T=8, Y=5.

TWENtY is a six digit number with no repeating digits and no zeros. When divided by T, perfect square WE or perfect cube NtY, the remainder is zero.

The only 3-digit perfect cubes with no repeating digits are 125, 216, 512, and 729. TWE000 must be a multiple of NtY since TWENtY is, but 729 is not a factor of 1000 and has no 3-digit multiple other than itself, so NtY cannot be 729. All the remaining possibilities involve the digits 1 and 2, so TWE cannot involve these digits.

The only 2-digit perfect squares not involving the digits 1 and 2 are 36, 49, and 64, so WE must be one of these.

If NtY is 216, then WE cannot involve the digit 6, so WE is 49. But 216 has no 3-digit multiple ending in the digits 49, nor does 216*125=27000 have any 3-digit multiple ending in the digits 49000. Contradiction, so the digits N, t, Y are 1, 2, 5 in some order.

If NtY is 512, then $TWE000=TWE*2^3*5^3$ is a multiple of $512=2^9$, so TWE is a multiple of $2^6=64$. Now WE cannot be 64 (no 3-digit number of the form T00 is a multiple of 64) or 49 (since then TWE would be odd and not a multiple of 64), so WE must be 36. A quick check shows that no 3-digit number of the form T36 is a multiple of 64, so we have a contradiction here too.

If NtY is 125, then TWE000 is automatically a multiple of NtY since 1000 is. But TWENtY is odd, so not divisible by 36 or 64, and again WE must be 49. So TWENtY is 349125, 649125, 749125, or 849125. Only the first of these is divisible by 49; it is also divisible by 3, so 349125 is the only solution. We have:

TWENtY=349125; T=3, W=4, E=9, N=1, t=2, Y=5.

• Oh, wait, right, I forgot there was no zero in the number.
– user88
Mar 30, 2015 at 8:46
• How are you getting 412765? I get 389517 and then 435706.
– user88
Mar 30, 2015 at 8:48
• I made a slip somewhere. Sorted now. Mar 30, 2015 at 8:52
• You ninja'd me the second time. Good job!
– user88
Mar 30, 2015 at 9:09
• @JqueryNinja This page has an algorithm for using the Chinese remainder theorem to solve a pair of congruences. TWENtY now also solved. Mar 30, 2015 at 9:15

The first number EIGHTY is a number that has the following moduli: 7 mod 11, 11 mod 13, 13 mod 17, and 17 mod 19.

By the Chinese Remainder Theorem, this number is congruent to 20005 mod 46189. If we brute-force the possible six digit numbers that satisfy this property, we find that 943785 satisfies the "G mod H" rule, as it is congruent to 3 mod 7, as well as the "no zeros" rule.

The second number TWENtY is divisible by NtY, which means that NtY divides TWE000. Additionally, NtY is a perfect cube. It can't be 1, 8, 27, 64, or 343, since all of those either have repeating digits or leading zeros.

So, let's try the other cases one-by-one and see what we get.

1. NtY = 216

In this case, the smallest multiple of 1000 that divides by 216 is 27000. The only numbers hence that have no repeating digits or zeros are 378216, 459216, 594216, 783216, 837216, and 945216, none of which satisfy the "WE = perfect square" rule.

2. NtY = 512

In this case, the smallest multiple of 1000 that divides by 512 is 64000. The only numbers hence that have no repeating digits or zeros are 384512, 768512, and 896512, again none of which satisfy the "WE = perfect square" rule.

3. NtY = 729

In this case, the smallest multiple of 1000 that divides by 729 is 729000 itself.

4. NtY = 125

In this case, every multiple of 1000 is divisible by 125. So we look at the composition of WE as well. It can't be 1, 4, or 9, since those have leading zeros. It can't be 16, 25, or 81, since those share digits with 125. And finally, it can't be 36 or 64, since those are even and a number ending in "5" is not even. So WE = 49.

With this information, we iterate through all the possible values of T to find that 349125 is divisible by all of 3, 49, and 125, as required.

• Ninja'd! But it can't be 204761 because we're told "no repeating digits and no zeros". Mar 30, 2015 at 8:46