On last week’s “Welcome to the math olympics”, I closed with a problem from the International Math Olympiad of 1981 (a bad year for wine – I would know, I was an avid drinker back then). I would like to take some time to present a solution to this problem, because this is where all the magic happens. What magic? You will see. Here is the problem again:

**Problem 6 (IMO 1981, modified): **If and , for all non-negative integers , find .

The solution that follows uses solely elementary mathematics. What does that mean? It means that a 15 year-old can figure out the solution, given enough time and an IQ of 300. And, indeed, there are some who can solve this problem in 15 minutes. But, as you will see, it takes clarity of mind that is only attained through relentless effort. Effort to the outside world – to you, it will feel like you are going down the rabbit-hole and you don’t want the journey to end. But you *must *enter this world with wonder, because it is the world of the imagination – a world where your greatest weapon is your curiosity, prodding your mind to see how far the rabbit-hole goes.

**Enter the rabbit-hole: **The first thing you observe is that the function has two arguments (inputs) and that you are given three equations that work as an algorithm for computing the value of this function on non-negative integers (0,1, 2, …, etc.) So, where do you start? Usually, you start with almost nothing, near the bottom and then work your way up. But why should *you* start near 0? Because you soon find that if you try to evaluate , or even , you get stuck. And getting stuck is the single greatest motivating force to make you **think** (wouldn’t that be nice). So we must think. “Can I evaluate ?”, for example. Let me stop to say something that is probably obvious to those with math and science backgrounds: *evaluate *means calculate an answer that will return a number, like 2, or 5, but not . The latter is a function with two inputs and unless you are given a prescription for how that function works (i.e. what number comes out for each pair of inputs), then you might as well think of it as a string of symbols and numbers – in other words, useless. OK, back to computing . You have three equations you can use: and the complicated-looking . Which one to use… You try the first one: . Can it help you to compute ? Nope. The first input is always 0 in that equation and you are asking for the value of the function when the first input is 1. So, you try the second equation: . Bingo. Choose and substitute on both sides of the equation to get: . And you are in business! Why? Because now you can use the first equation to get (the last equality follows from deep mathematics).

So far, you have seen how to use two of the equations to evaluate . Can you evaluate ? The first two equations are useless, since either the first or second input is always 0. You must use the third one by setting : , where you used for the second equality and applied the first equation to get the last equality. Sweet stuff. Now you can try to evaluate either , or . You try using the third equation with : . You don’t know what is, so you try to figure it out using the second equation with : (you evaluated a few lines back). Going back to , you see that you need to figure out what is, which seems more complicated than (you chose to evaluate instead and look where it got you… oh well). At this point you have two choices: Be stubborn and try to figure out (you really want to know what is and I can’t blame you), or switch gears and do the wise thing: Evaluate the simpler . Wisdom be damned. You are forging ahead with using the third equation with : . Did you see what you just did there? You used the first equation in the last equality with even though you don’t know what is yet (which is totally your fault). Now, a super-genius would notice that there is a pattern here whenever as an input: , where you used the third equation and then the first equation. Time to go wild, you think:

For *any *non-negative integer y! I bet you are wondering how you went from all the way to . I will tell you if you give this post 5 stars. Go ahead, it’s free and it will mean so much to my parents (who don’t even know about this blog…) OK, here is the answer: Pattern recognition. Again. Let’s make it explicit: . What should we put instead of the question mark? If you stare enough at the series of equalities, you will notice that the sum of the second argument and the number at the end is always (think about why this is the case). So and .

You didn’t see the pattern right away, but after you evaluated for up to 5, you noticed that the answer was always and then proved it using the reasoning from the previous paragraph. You have cleared the first level!

**Level 2** **Mission: ***Figure out for arbitrary non-negative integers .*

You have built enough intuition by now to see what you need to do next: figure out a general formula for , just like you did for . But how? Well, using the third equation again: , where you used your knowledge of the general formula for and put to get the last equality. And it is time to go wild once more:

BAM! Level 2 cleared. Let’s get through Level 3 using your experience points from Level 2: . This looks a bit more complicated than before… But you are even more curious than you are stubborn and you want to know; you must know. So you go even wilder this time:

If you only knew how to evaluate … You do! Use the second equation given to you: , where you used from Level 2. Recalling that (see Deal or no deal?), you get:

And Level 3 is cleared and you are ready for the final boss. But you have the Eye of Thundera (the scary-looking equation turned out to be your most powerful weapon), so you forge ahead:

At this point, you are strong enough to fight the last boss. You must find a formula for . It looks like , with twos in the *tower of power*. Can you do it? Show me how in the comments. If you need help with writing math in WordPress, search for “latex wordpress” and the internet will teach you how.

In all seriousness (and you will never hear this from me again), you have just completed a journey that few have ever undertaken. As I explained in my previous post, less than 0.001% of the world ever has the privilege of facing a problem like this and coming out on top. Now that you have been inside the belly of the beast, I will let you ponder on this: How far does the rabbit-hole *really* go?

johnpappasSeptember 19, 2012 at 5:33 amWe have .

So .

Therefore, the formula is somethin like , where and represent y times raising to the power of two.

spirosSeptember 19, 2012 at 8:14 amNice John! Why is there y+3 twos in the tower of power?

johnpappasSeptember 19, 2012 at 11:05 amMaybe because we have one two(the base two) and then more twos’s and then two more two’s because ? I am sorry sir if my answer is wrong.

spirosSeptember 19, 2012 at 11:13 amAlmost there John. Why are there more twos? Why not twos, for example?

johnpappasSeptember 19, 2012 at 11:44 amYou are right sir. If we forget the base two we have twos including the base two of the last power . So what remains is the = three twos. So to sum up, 1 base two, then y-1 twos including the base two of and then three more. Excuse me again if I am wrong.

spirosSeptember 19, 2012 at 12:37 pmCan you identify a place in my post where the ingredients for a proof of your statement above lie? Hint: It is close to the second image.

johnpappasSeptember 20, 2012 at 1:26 amFor a proof I was thinking something like

and the using the fact that the expression always equals so recursively we wll have the desired resutl. I might just writing stupid things. Please feel free to reveal the answer.

spirosSeptember 20, 2012 at 10:06 amLook at the paragraph before the second image above. I explain how it is that . Can you do the same for ? Hint: Look for a pattern: As the second input decreases by one, how many twos do you add to the tower?

johnpappasSeptember 22, 2012 at 6:44 amOk lets see again : , so whenever y decreases by one in the above expression we add one two(2) to the tower.

spirosSeptember 22, 2012 at 10:44 amExactly. So by the time y is zero, you have added y twos to the tower. And the proof is complete as you have mentioned already in a previous comment. Bravo John.

johnpappasSeptember 22, 2012 at 10:57 amNo sir it was all your effort. Please keep posting problems from IMO or other competitions. They are challenging, but with your guidance they are transformed into something almost magical!

TyleFebruary 9, 2013 at 10:06 amThanks, this problem was awesome! I am proud to say that I did it without looking at your hints – it took me a little more than 15 minutes though!

spirosFebruary 9, 2013 at 6:14 pmWell done Tyle!

ImanMarch 30, 2014 at 7:44 amIt was a nice problem really.took me half an hour -without hints-,but even though it took me half an hour to solve, it took me hours to think, whats happening!I mean, how much do we know about this F ?we can as it seems find it for infinite x’s and y’s but this infinite of course doesnt mean we know exactly all!so we can group those (x,y) ‘s we can find F.(perhaps show those discrete points in an x-y plane?) , so what would be those discrete points? like we know F(0,y) for all y.we know F(4,y) for all y.but what else?(what is ALL we know?)

ImanMarch 30, 2014 at 8:11 amit looks we know it for all natural x and y’s (we can continue to find F(5,y) and so on) but there is a point, to obtain F(k,y) from F(k-1,y) we need to solve a recurrent relation,as we did up to know.but can we solve all the recurrence relations which show up?They seem to get tougher each time!