At some point during my school years, a teacher as eccentric as I am suggested that I read The Man Who Counted, a work by Malba Tahan (ู ุงูุจู ุชุญุงู, in the Persepolitan dialect). By that time, I had already grown weary of compulsory readings, especially the monumental and exhausting Os Sertรตes, which had temporarily drained my vital energies and almost my ability to perceive colours.
I decided to give the writer of supposed Arab origin a chanceโwho, by the way, had absolutely no Arab heritage. His Arab name was a pseudonym.
By the time I had reached my fourth or fifth library card, I made a photocopy of the book, as it could not be taken home. It cost more than the book itself and in no time I had finished reading it. Only years later did I come across Herbert Wilf, whose writing was similarly engaging and fluid, with the same charm and humour, but without the tedious, poorly explained symbols commonly found mathmagics that, I advocate for, should bear a red-white badge: failed its purpose.
After class, the teacher approached to discuss. The original dialogue, now distorted by the thread of time, goes more or less like this:
๐จ๐ปโ๐ซ โ So, did you read it? Did you enjoy it?
๐จ๐ผโ๐ โ Oh I did, what's the next recommendation?
๐จ๐ปโ๐ซ โ After you finish this one.
๐จ๐ผโ๐ โ But Iโve already finished.
๐จ๐ปโ๐ซ โ I bet you didn't.
๐จ๐ผโ๐ โ Yes, I read all the little stories, I can retell the one about the camels, the kingโs reward in grains of rice, all of them.
๐จ๐ปโ๐ซ โ Unconvinced, did you solve the four fours problem?
๐จ๐ผโ๐ โ I missed that one. Whatโs the four fours problem?
๐จ๐ปโ๐ซ โ Using four fours, elementary operations, square roots, exponentiation, factorial, and termial, you need to find the numbers from 1 to 10.
๐จ๐ผโ๐ โ Whatโs a termial?
๐จ๐ปโ๐ซ โ Itโs like the factorial, but with sums; for example, the termial of 4 is 10, written with a question mark after the number: 4? = 1 + 2 + 3 + 4 = 10.
๐จ๐ผโ๐ โ Ah, as in the maths olympics, but they call it a triangular number.
๐จ๐ปโ๐ซ โ Thatโs right, 100? = 5050.
๐จ๐ผโ๐ โ Alright, give me an example of the four fours.
๐จ๐ปโ๐ซ โ By doing 4 + 4 โ 4/4, you get 7.
๐จ๐ผโ๐ โ But you didnโt use all the operations.
๐จ๐ปโ๐ซ โ You donโt have to, you must use exactly four fours and combine the operations as you wish for as many times as you want.
๐จ๐ผโ๐ โ Iโve finished, so what now?
๐จ๐ปโ๐ซ โ Now do it up to 20. Use other operators, use factorial and termial too.
๐จ๐ผโ๐ โ How far can we go?
๐จ๐ปโ๐ซ โ No one knows. I managed up to the low 40s, making large numbers is difficultโฆ I heard of a guy who got into the 70s!
๐จ๐ผโ๐ โ Wow, the 70s.
๐จ๐ปโ๐ซ โ If you manage up to 30, you donโt need to come to my lessons anymore.
Indeed, there is a myriad of ways to write the same number, for instance, just the number 10 accepts a rich collection of intricate doppelgangers:
First and foremost, I wish to express my profound admiration for those who devote their best years to the vocation of teaching.
Advancing to the following week, I brought my solutions solved up to around 165 on a couple of sheets. At the same time, curiously, a colleague who had solved about 18 or 20 was arguing, by modus ponens and emotional appeal, that this part should entitle her to a reduction of at least half of what had been promised.
In an undemocratic act, with no more resources for evading, the teacher finalised the challenge, frustrating my expectations of skipping classs within the bounds of the agreement, or rather, supported by the thread of a gentlemanโs mustache. A lesson remains: mathematics is reliable, humans are not.
From an ontological perspective, this problem reveals numerous facets.
Not only can each number be written in a different way, but a sequence of numbers is even more unique; we might say it is a fingerprint of the one who solved it. Two people thinking of exactly the same expressions may be more improbable than having a winning lottery ticket, ergo, in general, an honest solution is necessarily an original solution.
Difficulty gradually increases with higher numbers. It may be easy to find ten ways to write the number 10, but itโs not as simple for the number 100, and even less so for the number 1,000.
The numerical resources grow scarcer, and large numbers can only be reached by generating a repertoire of creative combinations.
Itโs no surprise that artificial intelligence models โoptimised lorem ipsum generators like GPTsโ cannot perform this combinatorial search by the time of this writing. Perhaps it is a fortress of human thought, in direct opposition to the nature of neural networks, that finds it difficult to explore these creative resources in a combinatorial weave and arrange them coherently.
The four fours have a pedagogical value that is worth exploring, as it is less susceptible to fraud and capable of measuring the depth and breadth of creativity and calculation, albeit in a rather exhaustive fashion.
Who cares about our lives
When we, whether for right or wrong,
Go on living, simply
The only life that we have.
Jรบlio Cรฉsar de Mello e Souza
Solution
You will find simpler and more natural solutions than the one I shall now present, especially for the earlier numbers.
A peculiar feature of this strategy is the use of a minimal amount of fours to express a range of numbers. This allows them to be reused opportunely in the composition of other numbers that are more difficult to achieve.
Compositions are based on pivot numbers. Their neighbours are continuously filled with the first tens, except for a few gaps.
In this logic, it is easier to construct many of the numbers, for example, in a range from 200 to 250, adopting a number in this range using just one four, 4โ????=231, and using clever combinations to branch out the numbers around it.
For aesthetic reasons, let us agree that the unary operators, termial (?) and factorial (!), take the highest precedence, meaning they should be resolved first in relation to the preceding term. For instance, "12/2?" should be understood as "12 / 3 = 4", not as "6? = 21".