# No won won? Wone Won

Find four different digits $$W, O, N, E$$ that satisfies the equation

$$\overline{NO} \times \overline{WON} \times \overline{WON} = \overline{WONEWON}$$

• What's up with the dashes above the letters? Are we negating anything, or how should I interpret those?
– Mast
May 4, 2019 at 19:11
• I have given some of earlier puzzles as straight combination...as NO..normally concatenation..somebody interpreted as multiplication..one of the editors modified to the current format..each letter stands for a digit..bar above signifies..it is one number
– Uvc
May 4, 2019 at 19:45

W = 1, O = 3, E = 0, N = 7

$$73 * 137 * 137 = 1370137$$

Method:

Divide both sides by $$WON$$

$$NO * WON = 10001 + (E000 / WON)$$

$$0 <= E <= 9$$

First consider cases when $$E$$ is not $$0$$ and

$$(E000 / WON) = X$$

$$E000 = E * 2^3 * 5^3$$

$$N$$ cannot be $$0$$ because $$NO$$ starts from it. So $$WON$$ cannot have both $$2$$s and $$5$$s as factors. If $$WON$$ does not have $$5$$s as factors it can be at most $$9*2^3=72$$ - not a three digit number. So $$WON$$ is an odd number divisible by $$5$$.

Now $$X$$ is obviously not divisible by $$5$$ because

$$NO * WON = 10001 + X$$

So $$WON$$ has to be divisible by $$125$$. That makes $$X <=72$$. Which contradicts $$10001 + X$$ being divisible by 125. So we proved that

$$E = 0$$ and

$$NO * WON = 10001$$

To get the last digit $$1$$ in the product with $$N$$ and $$O$$ being different digits we must have $$NO = 37$$ or $$NO = 73$$. $$37$$ is not a multiple of $$10001$$, so $$NO = 73, WON = 137$$

W=1, O=3, N=7, E=0

works because

73 * 137 * 137 = 1370137.

Also,

W=O=N=E=0

works, but I don't think that's what you meant.

• Welcome to Puzzling! (Take the Tour!) Regarding your "Also", the puzzle does say "four different digits" (emphasis added). :)
– Rubio
May 4, 2019 at 5:44

Like @ppgdev's answer, my first thought was to use algebra and focus on $$E$$ first. But the way I did it is sufficiently different I think it's worth giving as an alternative answer: I've edited my notation to match @ppgdev's in case anyone wants to compare the approaches.

$$\overline{NO} \times \overline{WON} \times \overline{WON} - \overline{WON0000}- \overline{WON} = \overline{E000}$$ factorises as $$\overline{WON}(\overline{NO} \times \overline{WON} - 10000 - 1) = \overline{E000}$$ so we can write $$X = \overline{NO} \times \overline{WON} - 10001$$, where $$X = \frac{\overline{E000}}{\overline{WON}}$$. Then $$X + 10001 = \frac{\overline{NO} \times \overline{E000}}{X}$$ implies $$X^2 + 10001X = \overline{NO} \times \overline{E000}$$. If we work modulo 1000 we can exploit the fact $$\overline{E000}$$ is a multiple of one thousand while $$10001$$ is one above a multiple of a thousand, and deduce $$X^2 + X \equiv X(X+1) \equiv 0 \pmod{1000}$$. From $$X = \overline{E000} / \overline{WON}$$ we see both $$X \ge 0$$ and $$X \le 9000/100 = 90$$ (we could slightly improve this upper bound by recognising the denominator is at least $$102$$ due to digits being distinct, but this doesn't change much). Since $$0 \le X \le 90$$, the only way $$X(X+1)$$ can be a multiple of $$1000$$ is if $$X=0$$: we can't have $$X$$ and $$X+1$$ both be multiples of five, so for $$X(X+1)$$ to be a positive multiple of $$1000 = 2^3 \times 5^3$$ would require either $$X$$ or $$X+1$$ to be divisible by $$5^3 = 125$$, well above our upper bound for $$X$$. Since $$X=0$$, we know $$E = X/(\overline{WON} \times 1000) = 0$$ and $$\overline{NO} \times \overline{WON} = 10001$$. The final digit of $$O\times N$$ must be $$1$$, and for $$O$$ and $$N$$ to be distinct the only possibilities are $$3$$ and $$7$$ in some order. If $$\overline{NO} = 37$$ then $$\overline{WON} = 10001/37$$ is not an integer, but if $$\overline{NO}=73$$ then $$\overline{WON} = 10001/73 = 137$$ which has the required form, with $$W=1$$ distinct from $$E = 0$$, $$N = 7$$ and $$O = 3$$ as required. Finally we check $$73 \times 137 \times 137 = 1370137$$.

Now that's how I actually did it, so my final steps are identical to @ppgdev. But it did involve some long divisions (or, more honestly, use of a calculator) which are a bit unsatisfactory. Can we instead establish the answer just by using digit sums?

Let's resume at the point we established $$E=0$$. If we work modulo nine, we can deal with the digit sum $$(N + O) \times (W + O + N) \equiv 1 + 0 + 0 + 0 + 1 \equiv 2 \pmod{9}$$. We know $$W$$, $$O$$, and $$N$$ are digits between one and nine (non-zero as they are distinct from $$E$$) and since $$O$$ and $$N$$ are distinct we must have $$3 \le O + N \le 17$$. The only multiplications that make two modulo nine are $$1 \times 2$$, $$4 \times 5$$, and $$7 \times 8$$ because most of $$2$$, $$11$$, $$20$$, $$29$$, $$38$$, $$47$$, $$56$$, $$65$$, $$74$$ are either prime or have a two-digit prime factor. The possibilities for $$N+O$$ and $$W+O+N$$ are tabulated below, and show either $$W=1$$ with $$N+O$$ one of $$\{4, 7, 10, 13, 16\}$$, or $$W=8$$ with $$N+O$$ in $$\{5, 8, 11, 14, 17\}$$.

N + O (mod 9) N + O W + O + N (mod 9) (W+O+N) - (N+O) (mod 9) W
1 10 2 1 1
2 11 1 -1 8
4 4 or 13 5 1 1
5 5 or 14 4 -1 8
7 7 or 16 8 1 1
8 8 or 17 7 -1 8

If we work modulo 11, we get the alternating digit sum instead. Take units as positive, tens negative, etc: $$(-N + O) \times (W - O + N) \equiv 1 - 0 + 0 - 0 + 1 \equiv 2 \pmod{11}$$. Since $$O$$ and $$N$$ are distinct digits between one and nine, $$O-N$$ must be a non-zero integer between $$-8$$ and $$8$$ inclusive. Let's write $$Y \equiv O - N \pmod{11}$$. Trying $$W=8$$ we get $$Y(8-Y)\equiv 2 \pmod{11}$$, so $$Y^2 - 8Y + 2 \equiv 0 \pmod{11}$$. A good way to solve quadratic equations in modular arithmetic is to complete the square: $$(Y-4)^2 \equiv 16 - 2 \equiv 3 \pmod{11}$$. Now, essentially following the steps of the quadratic formula, we find the square roots of three mod eleven. There are algorithms for this (Tonelli-Shanks, Cipolla's, Pocklington's) but mod eleven it's easy to just check all possibilities: the only ones that work are $$Y-4 \equiv 5, 6 \pmod{11}$$ so $$Y \equiv 9, 10 \pmod{11}$$. The only values of $$O-N$$ in our required range are $$-2$$ and $$-1$$. This means $$N>O$$, so $$N$$ is at least two. This can't work, as then $$\overline{NO} \times \overline{WON}$$ is over $$20 \times 800 = 16000$$, far above the required $$10001$$. (In fact we could have avoided solving a quadratic equation modulo eleven if we'd noticed eight looked suspiciously high for $$W$$. Even $$13 \times 800 = 10400$$ is too large, so we needed $$\overline{NO} < 13$$. For distinct digits, the only possibility that remains is $$\overline{NO} = 12$$ but clearly $$12 \times 821 \neq 10001$$.) We must have $$W=1$$ and $$Y(1-Y)\equiv 2 \pmod{11}$$. A nice trick is that $$Y^2 - Y$$ is the same as $$Y^2 - 12Y$$ (since we're allowed to add or subtract any multiple of eleven) which is easier to complete the square on: $$Y^2 - 12Y + 2 \equiv 0 \pmod{11}$$ gives $$(Y-6)^2 \equiv 36 - 2 \equiv 1 \pmod{11}$$. The only possibilities are $$Y-6 \equiv -1,1 \pmod{11}$$ so $$Y \equiv 5,7 \pmod{11}$$. Don't like the idea of completing the square to solve a quadratic in modular arithmetic? Rewrite the equation as $$Y(Y-1) \equiv -2 \equiv 9 \equiv 20 \equiv 31 \equiv 42 \equiv \cdots \pmod{11}$$. Then by observation, $$Y(Y-1)$$ is $$5 \times 4 = 20$$ or $$7 \times 6 = 42$$. This still needs me to use a fact about quadratic equations in modular arithmetic: with an odd, prime modulus (so eleven is fine, but working modulo nine is more complicated), if we've found two solutions then we've found them all.

N\O 2 3 4 5 6 7 8 9
2 S. .. .. S. .. .D S. .D
3 .. .. S. .. .. S. .D ..
4 .. S. .. .. S. .. .. SD
5 S. .. .. S. .. .. S. ..
6 .D .. S. .. .. S. .. ..
7 .. SD .. .. S. .. .. S.
8 SD .. .D S. .. .. S. ..
9 .. .D S. .D .. S. .. ..

Fine, I hear you cry, digit sums let you avoid any long division. They're clearly a powerful tool. But you still had three long multiplications to check at the end — and why didn't you consider the final digit? Show me the lazy method! I don't want no stinking tables! And definitely, definitely, no quadratics!

So here's the "easy" method from combining the best of these approaches. Let's skip to the point where we know $$E=0$$ and $$\overline{NO} \times \overline{WON} = 10001$$. Working modulo ten (final digit check), $$O \times N \equiv 1 \pmod{10}$$. The only possible multiplications that achieve this are $$2 \times 2$$, $$3 \times 7$$ and $$9 \times 9$$ (since most of $$1$$, $$11$$, $$21$$, $$31$$, $$41$$, $$51$$, $$61$$, $$71$$, $$81$$ are prime or have a two-digit prime factor) but $$O$$ and $$N$$ must be distinct, so they must be $$3$$ and $$7$$ in some order. Whichever order, we know $$O+N=10$$ and $$Y = O-N = \pm 4$$. Working modulo nine (digit sum), $$(N + O)(W + O + N) \equiv 2 \pmod{9}$$ simplifies to $$10(W + 10) \equiv 1(W+1) \equiv 2 \pmod{9}$$ so we know $$W \equiv 1 \pmod{9}$$. In the valid range of digits, this can only be $$W = 1$$. Working modulo eleven (alternating digit sum), $$(-N + O)(W - O + N) \equiv 2 \pmod{11}$$ simplifies to $$Y(1-Y) \equiv 2 \pmod{11}$$. Trying $$Y=-4$$ gives $$-4(5) \equiv -20 \equiv 2 \pmod{11}$$ which works, but $$Y=4$$ gives $$4(-3) \equiv -12 \equiv 10 \pmod{11}$$ which doesn't. So we must have $$O+N=10$$ and $$Y=O-N=-4$$, hence $$O=(10+(-4))/2=3$$ and $$N=(10-(-4))/2=7$$. The only possibility we need to test is therefore $$73 \times 137 = 10001$$ and the only solution is $$73 \times 137 \times 137 = 1370137$$.

As this is not tagged "no-computers", I just used some Python :

Solution : {'W': 1, 'O': 3, 'N': 7, 'E': 0}

Method (Python) :

    def digit_sequence(string, digits): # string is sequence, digits are dictionairy with wone
result=0
for i in range(0, len(string)):
result+=digits[string[i]]*(10**(len(string)-i-1))
return result
for W in range(0, 10):
for O in range(0, 10):
if W == O:
continue
for N in range(0, 10):
if N == W or N == O:
continue
for E in range(0, 10):
if E == W or E == O or E == N:
continue
# Four different digits W, O, N, E
# Now check whether equation is fulfilled
digits={"W": W, "O": O, "N": N, "E": E}
if digit_sequence("NO", digits)*(digit_sequence("WON", digits)**2) == digit_sequence("WONEWON", digits):
print("Solution : "+str(digits))

• I thought it might be fun to put together a solution that does this with an SMT solver, too. I used cryptol as my front-end, and I think it turned out pretty beautiful. Here it is in a gist just six lines long; an excerpt of interest is isSolution w o n e = all isDigit [w,o,n,e] /\ no*won*won == wonewon /\ no != 0. May 4, 2019 at 17:29
• You could add this as answer, too, @DanielWagner May 4, 2019 at 19:56
• (This isn't PPCG though. Different mechanical means of arriving at the same result don't really provide any new information here. If you want to elaborate on an innovative method as your answer that's one thing; but just providing code that brute-forces the solution, or uses language or library functionality that keeps the actual mechanism mostly in a black box, is little better than stating 'the answer is X because magic'—it provides the same answer someone else already has, and does nothing to explain how to reach it. A comment is fine... an additional code answer probably isn't.)
– Rubio
May 4, 2019 at 23:40