An Interesting Challenge:
The Forgotten Problem of Posts and Sparrows

Problem: Several sparrows sit on certain posts. If there is one sparrow on each post, there are n sparrows flying; if there are n sparrows on each post, there are n free posts. Determine the number of sparrows and the number of posts.
Note: A numerical solution is required. The number of posts is unique, while there are two possible values for the number of sparrows.
Solution:
Let us denote by \( \displaystyle p \) the number of posts, and by \( \displaystyle g \) the number of sparrows. Additionally, we will classify the sparrows into two categories: sparrows on the posts, \( \displaystyle g_p \), and sparrows flying, \( \displaystyle g_v \). According to the problem statement, the total number of sparrows can be expressed in two equivalent ways:
Expression of \( \displaystyle g \) as a sum: \( g = p + n \).
The problem states that “there is one sparrow on each post,” so we have:
\[ g_p = p \]Furthermore, since there are \( \displaystyle n \) sparrows flying, we can write:
\[ g_v = n \]Given that the problem states: “If there is one sparrow on each post, there are \( p \) sparrows flying,” we can establish the following equation, which is the simplest to see:
\[ \displaystyle g = g_p + g_v, \quad \text{that is,} \quad g = p + n \]Expression of \( \displaystyle g \) as a product: \( g = n \cdot (p - n) \).
Alternatively, we must interpret: “If \( \displaystyle n \) sparrows perch on each post, there are \( \displaystyle n \) posts left empty.” This allows us to express the total number of sparrows as the product of two factors. In this formulation, \( n \) represents the number of groups or locations where the sparrows are distributed, while \( p - n \) is the number of sparrows assigned to each group.
To better understand the expression \( n(p - n) \), a detailed explanation is provided below:
- It is assumed that the sparrows are distributed into \( n \) groups or locations.
- In each group, \( p - n \) sparrows are assigned. This quantity arises by subtracting \( n \) from the total number of posts \( p \), giving us the number of sparrows assigned to each group.
- By multiplying the number of groups \( n \) by the number of sparrows in each group \( (p - n) \), we obtain the total: \( g = n \cdot (p - n) \).
By equating both expressions for \( g \), we obtain the fundamental equation to solve the problem:
\[ \displaystyle p + n = n \cdot (p - n). \]Solving the equation
To solve for \( \displaystyle p \), let us start by applying the distributive property: \[ \displaystyle p + n = np - n^2. \]
Next, we move all terms to the left-hand side: \[ \displaystyle np - n^2 - p - n = 0. \]
Now, we group terms conveniently:
\[\displaystyle p(n - 1) - n(n + 1) = 0.\]an equation that is equivalent to:
\[ \displaystyle p(n - 1) = n(n + 1) \]And since \( n \) cannot be 1, we can isolate \( p \):
\[ \displaystyle p = \frac{n(n + 1)}{n - 1} \]
Condition for \( \displaystyle p \) to be an integer:
The denominator \( \displaystyle n-1 \) must exactly divide the numerator \( \displaystyle n(n+1) \). Now, since \( \displaystyle n \) and \( \displaystyle n-1 \) are consecutive integers, they are coprime, so \( \displaystyle n-1 \) can only divide \( \displaystyle n+1 \).
Using a simple common denominator, it is easy to see that:
\[ \frac{n+1}{n-1} = 1 + \frac{2}{n-1} \]which implies that the number 2 must be divisible by \( \displaystyle n-1 \). Consequently, there are only two possibilities:
-
Case 1: \( \displaystyle n-1 = 1 \) (i.e., \( \displaystyle n = 2 \))
\[ \displaystyle p = \frac{ 2 \cdot 3 }{ 1 } = 6,\quad g = \frac{ 2 \cdot 2^2 }{ 1 } = 8 \] -
Case 2: \( \displaystyle n-1 = 2 \) (i.e., \( \displaystyle n = 3 \))
\[ \displaystyle p = \frac{ 3 \cdot 4 }{ 2 } = 6,\quad g = \frac{ 2 \cdot 3^2 }{ 2 } = 9 \]
Calculation of the number of sparrows
Although not necessary, we can also solve for \( \displaystyle g \) in terms of \( \displaystyle n \). Starting from: \[ \displaystyle g = (p - n) \cdot n, \] Substituting the value obtained earlier for \( \displaystyle p \), we have: \[ \displaystyle g = \left(\frac{ \displaystyle n(n+1) }{ \displaystyle n-1 } - n\right)n \]
We proceed to simplify the expression inside the parentheses: \[ \displaystyle \frac{ n(n+1) }{ n-1 } - n = \frac{ n(n+1) - n(n-1) }{ n-1 } \]
Since the numerator reduces to: \[ \displaystyle n(n+1) - n(n-1) = n^2 + n - n^2 + n = 2n \]
we conclude that: \[ \displaystyle g = \left(\frac{ 2n }{ n-1 }\right) \cdot n \]
- That is, \[ \displaystyle g = \frac{ 2n^2 }{ n-1 } \] which requires that \( \displaystyle n-1 \) divides \( \displaystyle 2n^2 \), forcing \( \displaystyle n-1 \) to divide the prime number 2.
Conclusion
The only valid values for \( \displaystyle n \) in this problem are \( \displaystyle n = 2 \) and \( \displaystyle n = 3 \). In both cases, we obtain: \[ \displaystyle p = 6. \] And the number of sparrows is: \[ \displaystyle g = 8 \quad \text{(if } n = 2\text{)},\qquad g = 9 \quad \text{(if } n = 3\text{)}. \]
The Mathematical Problem That Lingered in My Mind
For decades, this numerical challenge has occupied my thoughts. When I first encountered it, at a glance, I could not discern a clear approach to solving it. However, once I decided to think about it seriously, I managed to understand the direction in which its resolution should proceed. Yet, another question intrigued me: where had it come from, and who had originally posed it?
Although I first came across the problem in Spanish, I found it strange that it left no trace in the other languages I used to study: English, French, Italian, or Portuguese. Even after years dedicated to teaching and mathematical research, I never stumbled upon it in any of these sources. This absence led me to suspect that the challenge had originated in Spanish or perhaps from a more localised tradition, possibly from a lesser-known branch of European or Soviet mathematics, both flourishing centres of creativity and mathematical innovation at the time.
The First Encounter: A Challenge in Secondary School
I first encountered the sparrows and posts problem during my secondary school years in Uruguay, while taking preparatory courses for university admission. Our mathematics teacher at the time, Juan Patritti Garbarino, presented it as an exercise from Introducción al análisis matemático by Luis Osin. First published in 1966 by Editorial Kapelusz in Buenos Aires, this textbook became a standard reference work by the Uruguayan industrial engineer and gifted mathematics educator.
This challenge that left me perplexed: a problem without a single concrete number, yet one that led to a precise numerical solution. However, this solution was not provided alongside the problem itself but appeared in an appendix where the authors shared selected answers to certain exercises.
What was particularly intriguing was that while the number of posts was unique, the number of sparrows admitted two distinct possibilities. This was not a routine algebraic exercise but a true mathematical puzzle, an enigma hiding a subtle and elegant structure, making the challenge all the more fascinating.
Like any proactive student, I immediately set out to solve it. However, the mathematical tools at my disposal were still too limited, and I quickly realised that the challenge exceeded my capabilities at the time. Handling two equations with three unknowns—an unspecified parameter n, the number of posts p, and the number of sparrows g—proved to be far more intricate than I had anticipated.
At that moment, however, my mind was captivated by another great mystery: the game of chess. I do not recall the exact moment, but it is most likely that after a few minutes of struggle, I set the problem aside for another time and headed to the chess club, seeking both entertainment and a welcome distraction after an intense day of classes.
The next day, when the teacher asked about the homework, it became clear that no one had managed to solve it. Some admitted they had tried but failed, while others had given up without much effort. Realising that this was more than just another routine textbook exercise—perhaps even a problem of genuine mathematical substance—I returned home with renewed motivation. Determined to understand its underlying structure, I began to analyse it more deeply, testing concrete values for p. Gradually, I began to unravel its inner workings and arrived at formulas that seemed to lead me in the right direction.
Fortunately, Osin’s book included the final numerical answer—providing the values for the number of posts and sparrows—but without explaining how to arrive at them. This allowed me to verify that my reasoning was on the right track. Yet, one question remained: was there a more elegant way to solve it? I presented my solution to the teacher, who deemed it reasonable, and life moved on. Still, the problem lingered in my mind, leaving an impression that went beyond its mere resolution.
A Problem with History
Years passed, and with them, my mathematical knowledge expanded without limits, delving into new ideas and challenges. However, two questions continued to haunt me, relentless, refusing to fade with time:
1. Was there a more direct and beautiful solution?
2. Who had created such a remarkable problem?
Eventually, I answered the first question, but the second remained an open mystery for decades.
When I began teaching at the Deutsche Schule Montevideo, I had the fortune of sharing long conversations with Jorge H. Cánepa, a brilliant educator and author of mathematics textbooks. We shared a rigorous approach to teaching and a passion for the history of mathematics, which led us to co-author several books.
In one of them, we decided to include the problem of the sparrows and the posts, this time with a much more refined solution than the one I had devised at sixteen. By then, I had already answered my first question, but the second continued to pursue me.
One day, I asked Jorge:
—This problem… was it an original creation by Luis Osin, or did it come from elsewhere?
With his prodigious memory, Jorge did not hesitate to reply:
—No, it is not by Osin. That problem was already circulating in the 1940s. I am certain I have seen it in a book in my library. Give me a few days; I will look into it.
He did not take long to find it. Soon, he returned with a precise reference: the problem appeared in the work Colección de problemas de álgebra, compiled by A. G. Ioachimescu and translated from the fourth Romanian edition by B. I. Baidaff. This work was published in Buenos Aires in 1940.
This opened a new set of questions. Who was A. G. Ioachimescu, the author? Who was B. I. Baidaff, the translator? And, above all, what was the true origin of the problem?
Tracing the Origin of the Puzzle
Years passed, and with them, research tools improved. With the advent of the internet, I had an idea: translate the problem into Romanian and search for it in specialised digital libraries.
It was then, almost miraculously, that I came across the problem in an 1903 issue of the prestigious Romanian journal Gazeta Matematică, one of the most renowned in its field. There it was: the same exercise, transcribed by Ioachimescu. But the most revealing detail was that, alongside it, appeared the name of the original author: O. Țino.
With renewed motivation, I discovered that behind the initials "O. Țino" lay Ovidiu N. Țino (1881–1959), a young student in 1903 who, over time, became a distinguished mathematician and professor at the Polytechnic School of Timișoara. His legacy was so profound that Ioachimescu himself paid tribute to him in the third edition of his Culegere de probleme de algebra (1926):
“My former student, friend, and colleague, Professor Ovidiu N. Țino, kindly offered to oversee the publication of this new edition, which I gladly accepted. He and Professor C. Ionescu-Bujor have revised and improved almost all the previous work, for which I extend my deepest gratitude.”
But the story did not end there. It turned out that the translator of the Spanish edition, Bernardo Ignacio Baidaff (1888–1967), was not only a bridge between languages but also a central figure in the development of Argentine mathematics. His influence was so profound and enduring that the renowned mathematician Alberto Calderón later recalled with admiration:
“Romanians played a crucial role in my life: the first was Dr. Save Bercovici, the second was Dr. Bernardo Baidaff, and the third was my second wife, Alexandra Bellow. Dr. Baidaff generously offered me access to his library and guidance, leading to a lifelong friendship.”
A Journey Through Generations
This journey was not simply about solving a mathematical puzzle but about rediscovering a priceless piece of mathematical history.
From the pages of a textbook in Montevideo to the archives of a prestigious Romanian journal in Bucharest, the problem of the sparrows and the posts crossed continents and generations, preserving its timeless charm.
If anyone else has come across this problem in sources outside Romanian, I would love to hear their story. Perhaps, in some corner of the world, there are still more pieces to uncover in this fascinating puzzle.