Any math whizzes out there?

Our 14-year-old participated in a math contest yesterday and was given this equation to solve:

Find two two-digit natural numbers ( a ) and ( b ) such that

a^2 + b^2 = 100a + b

without using a calculator. This was the only problem he couldn’t solve, and I’ve been racking my brain trying to figure out how it’s supposed to be done. Any ideas?

Trial and error? If a2=100a and b2=b it is trivial. Not sure I can prove there are no other solutions

He also used trial and error—a lot of it, especially without any electronic help. There were 14 problems in total, and he knocked out 13 in the first hour. But then he spent the next hour and a half stuck on this one equation before finally giving up. The whole test was 180 minutes long.

a = zero and b = 1

natural two-digit numbers

1 Like

That’s the part that’s giving me grief, it would be an easy problem to solve if it wasn’t for that part.

I agree.
ChatGPT struggles with math, and DeepSeek only solved it after multiple attempts using trial and error. I just think that approach would be too time-consuming in a test scenario unless you happen to guess the right numbers early on.

A^2 + B^2 = 100 A + B

If A = 100, I already see the first term in both sides of the equations could be eliminated, thus:

B^2 - B = 0

That’s a 2nd order equation that can be solved with the quadratic formula.

But, if we’re lazy we already know that the only number which its power 2 it’s equal to the number it’s 1.

So, A=100, B=1.

But, this is a dirty solution. If they’re asking for a mathematical demonstration, the initial IF is not valid haha

Find two two-digit natural numbers ( a ) and ( b ) …

1 Like

I asked my hubby to help solve the equation, and he decided to use Excel to find the solution. At first, he tried going down the complicated path of solving the equation mathematically on paper, but being the lazy guy he is, he quickly switched to a simpler approach. He used trial and error for the value of B, testing two-digit numbers from 10 to 99. It took him less than 20 minutes to create the Excel formula and calculate the results. He found that when he entered 33 for B, the corresponding value for A was 88 and 12 (since it’s a second-degree equation, there are two possible solutions). Here’s a screenshot of his Excel sheet for reference.

ahhh more coffe…

1 Like

When testing values for B in Excel, we noticed that after entering 51 and above, Excel returns an error. This happens because the discriminent (delta) of the 2nd degree equation becomes negative, meaning there are no real solutions for B beyond 50. Therefore, the valid range for value B is only between 10 and 50.

1 Like

It’s going to come down to expressing it as a quadratic equation and then applying the relevant formula… which I’m not going to attempt.

1 Like

My first line of thinking was that you need to go trial an error checking what ten could be reasonble for A, for example 20 or 30 is too low. but 50 starts beeing promising (50 and 51 is 2500+2601=5101 vs 5051 or 5150, depending on in what order you place them). Then tried adding or subtracting one or two to either of those values, but it did not seem to be “converging” or showing a pattern of how much I would have to add or subtract.

Then I thought that being both two digits, B is quite negligible compared to B^2, so A^2+B^2 ~ 100A, and then dividing by A, A + B^2/A ~ 100. Then again with some trial and error, I thought that A could be around 90 and B around 30. Then again trial and error adding or subtracting 1 or 2… but this again was quite slow and you no longer now in what direction you should be going.

Then I saw linnea_uzh’s post and, withouth looking at her excel, I thought that indeed a more systematic approach was needed, and setting up a table of squares should facilitate the task. So I started from 99 down (calculating them as (100-1)^2=1000-2x100x1+1 etc or (90+1)^2 etc… and on the other front a table with the squares of up to 30, than can be built quile easily.

With these two tables, once you take for example 93, 93^2=8649, you need to check for a second number whose square is around 700, so you can go to the second table and check for 26 and 27 (none of them works). I found the solution with this approach, but it requires quite a lot of work to get there, and manual calculatinng skills which are probably not so much trained nowadays

My hubby slightly changed the Excel sheet and decided to solve for B by deriving the equation. He then plotted the values of A that were already found. Interestingly, whether A = 12 or A = 88, Excel returned the same values: B = 33 and B = -32. This shows that in case ‘le nombre entier’ can also be a negative integer, then we have two possible values for B.


Since the values of A and B could only be two-digit nombres entiers, it wasn’t too hard to use Excel to find them. At least, that’s what my hubby told me! So the final answers are:
A = 12 and 88,
B = -32 and 33.

Well that’s all well and good, but I don’t think it would count as “not using a calculator” and I’m pretty sure that trial and error is not how they expect this problem to be solved.

3 Likes

I was hoping for a mathematical equation on paper since pencil and paper were all that were allowed.

I do not think this problem can be solved through any kind of equation to come to the solution, and requires trial an error to find a pair of numbers that fulfil that.

What I also thought is that since the right hand side is 100A+B, it means that the two last digits of A^2 + B^2 shall be equal to B. But the last two digits of A^2+B^2 could be anything. If we look at the last digit of the sume of squares… then we can split A and B in tens and units, and the since last digit of A^2 and B^2 will not depend on the tens, we could build a table with the possible units of A (o to 9), the possible units of B (0 to 9) and check when the sum of their squares ends with the unit of B (or the unit of B plus some tens).

Building this table actually takes quite some time, but we would see that either A ends in 0 and B in 0,1,5 or 6, A ends in 2 and B in 3 or 8, or A ends in 8 and B in 3 or 8. For the case where A ends in 0, this means that A^2 ends in 00, so B^2 must be B plus some hundreds (example, 25^25=625), but we can fairly quickly check that none of this options work.
So we are left with A ending in 2 or 8 and B ending in 3 or 8. That is still quite a large amount of possible combinations, but it would narrow the search down.
I did not find a way to do a similar thing with the last two digits of the sums of squares, which must equal B.

I really appreciate everyone taking the time to try and solve this equation.
I’m surprised this was one of the problems given to the kids in this Swiss/international math competition—especially since all the other problems could be solved on paper.