# (un)^2=deux math

1. Oct 2, 2004

### asfd

Yesterday I found a math document we were given in our 3rd year of High School and there is a question overwhelming me. We have to find the two solutions of $$(UN)^2=DEUX$$ where each different letter has a different integer value and where U!=0 and D!=0 . If I understand correctly I should solve this $$(10*U+N)^2=1000*D+100*E+10*U+X$$ knowing U>2, D!=0 and U!=N!=D!=E!=U!=X (!= meaning isn't equal to) but I have no clue about how to solve it. The only thing I can find is $$X=100 U^2+20 UN+N^2-1000 D-100 E-10 U$$ and I'm not even sure of this answer... Could anybody give me a hint to the solution?

2. Oct 2, 2004

### Tide

There are quite a few solutions (I counted 7).

Observe, UN must be greater than 31 in order for its square to contain 4 digits. Therefore, U is greater than or equal to 3. Likewise, N is restricted to the digits 2, 3, 4, 7, 8, 9 otherwise UN's square will end with the same digit. Consequently, X must be one of 1,4, 6 or 9.

There are probably other clues one can pick up but at the very least (and not so elegantly) you can pick out the allowed two digit numbers that satisfy all those conditions, namely 53, 54, 57, 59, 72, 79 and 84.

3. Oct 2, 2004

### Alkatran

Do you know that that is french for (One)^2 = Two ?

And I thought that the definition of ! didn't allow for any 0 values?

4. Oct 2, 2004

### Tide

Of course! Maybe someone would like to try
$$ONE^2 = TWO$$
Or perhaps German, anyone? :-)

I think zeros were excluded only for the first digit of each number.

5. Oct 3, 2004

### asfd

This is what I meant... Thanks for your hints I'll investigate this a little further but did you notice that U must have the same value un UN and DEUX

I still don'T understand how you got the answers... Did you go for brute force or am I missing something?

Last edited: Oct 3, 2004
6. Oct 3, 2004

### Tide

Basically, yes. I saw that I could narrow down the choices and think that if I stared at it long enough I'd find more ways of narrowing them down further but didn't have time to do so.

7. Oct 3, 2004

### shmoe

Maybe I don't quite understand the problem, but I don't see how any of Tide's answers work. e.g. 53^2=2809, don't we want the 10's digit in both sides to match?

Aren't we looking for something like 43^2=1849, all the digits different except the tens place?

Each letter is supposed to represent a digit, correct? If that's the case, then the english version (one)^2=two has no answers (three digit number squared has more than 3 digits, unless you allow zero for the first digit)

8. Oct 3, 2004

### Tide

You're absolutely right! I solved the wrong problem - thanks for setting me straight!

9. Oct 3, 2004

### Dburghoff

You misread the topic creator. By "U!=0", he actually meant $U \neq 0$. In computer programming languages, "!=" is often used to denote "not equal to."

10. Oct 3, 2004

### Gokul43201

Staff Emeritus
Aha...like magic ! Would you tell us how how you got that (ie : how small a set did you narrow it down to) ?

Here's what I have :

$$100U^2 + 20UN + N^2 = 1000D + 100E + 10U + X$$

From tide's argument, U must be in {3,4,5,6,7,8,9}, N in {2,3,4,7,8,9} and X in {1,4,6,9}
Now from the above equation, we have :

$$N^2 \equiv 10U + X~~(mod~20)$$

Now, the congruence class of N^2 is {1,4,8,16} (mod 20). So, using a little liberty with notation ([ ] denotes a set), I write

$$[1,4,9,16] \equiv 10U + [1,4,9,6] ~~(mod~20)$$

This tells me that U must be even (ie : in {4,6,8}) if $N^2 \equiv [1,4,9]$ (ie: if N is in {2,3,7,8,9}) and U must be odd (ie: in {3,5,7,9}) if N=4.

We now have (3*5) + (4*1) - 1 = 18 numbers to check. That's a little better than 42 cases (after tide's elimination).

Or, we could go further...using modulo 100 from here...but that seems to be more work than just checking these 19 cases. Can't think of anything quickly that does much better, without too much work.

Going through this list gives 69^2 = 4761 as the only other solution (besides shmoe's 43^2 = 1849).

Last edited: Oct 3, 2004
11. Oct 3, 2004

### asfd

What your saying seems to make sense but I don't know what you mean by mod 20...

12. Oct 3, 2004

### Gokul43201

Staff Emeritus
$a \equiv b~~(mod~20)$ means that a, b leave the same remainder when divided by 20. In particular, b could itself be the remainder when a is divided by 20.

Notice that multiples of 100 and 1000 leave no remainder (ie : remainder = 0), when divided by 20, and that 49, 64 and 81 leave remainders of 9, 4 and 1.

13. Oct 3, 2004

### shmoe

Method#1 N=2,3,4,7,8 or 9 (see Tide's post).

In each case I looked at the second digit of (UN)^2=100U^+20UN+N^2.

For N=2 or 3 the N^2 contributes nothing, so we just look at 20UN. The tens digit is therefore 2UN mod 10. This must be equal to U:

N=2 we get 4U=U mod 10, so 3U=0 mod 10. This has no solutions.
N=3 we get 6U=U mod 10, so 5U=0 mod 10. So U=4, 6, or 8 (U>2). Check 43, 63, and 83. Only 43 gives unique digits.

For N=4, 7, 8, 9, we have to consider the contribution of N^2 to the tens digit.

N=4, N^2=16, so the tens digit is 2UN+1=8U+1 mod 10. Again, we get 8U+1=U mod 10, or 7U=9 mod 10 or U=7 mod 10. Check 74^2 and it doesn't work.
Same idea for N=7, 8, but here you'll find no solutions to our mod 10 equation
N=9 gives 69 as a result, which works.

Perhaps not the most elegant way, but the arithmetic mod 10 takes much less time to do than it does to type out! Everything you have to square satisfies the tens digits matching (there were only 5 total), but not necessarily the otherwise unique digit criterea.

Method#2 Get Maple to square the numbers from 32 to 99 and report back the ones whose tens digits match. Total time, including maples start up, under 90 seconds. Least elegant method of all, but possibly the fastest.

14. Oct 3, 2004

### Gokul43201

Staff Emeritus
Ah, I don't have Maple at home, but managed to coax the same out of Excel. And I had to run down a column of numbers to identify the 0s in it...that's not hard, they stand out.