October 02, 2025
We revisit the classic ‘guess my number’ game and extend it from its familiar binary form to representations in any integer base. For each base we derive formulas for the number of cards needed to identify a given integer and, conversely, for the largest integer that can be determined when the number of cards is fixed. Both analysis and graphical evidence show that base \(2\) is optimal in both directions: it requires the fewest cards to represent any specified integer and, for a fixed card count, allows the widest range of integers to be guessed. Figures illustrate these results, and complete proofs appear in the Appendix.
Walking through the streets of Naples, one might encounter Giuseppe Polone, a master of constructing magic squares, capable of producing designs as large as \(25 \times 25\) [1]. It is said that Polone’s fascination began decades ago, when a 1978 journey through the Amazon left him stranded for weeks; to pass the time he invented crosswords and magic squares and developed novel methods for creating ever-larger ones. Among the many mathematical games he now shares with curious passersby, one is particularly striking: the guessing of a secret number between \(1\) and \(60\).
Polone performs this feat by displaying six special cards, illustrated in Figure 1. The participant merely indicates on which of these cards the chosen number appears, and with only this information Polone can reveal the secret number without fail.
Although captivating when performed in the street, this is in fact a well-known mathematical game (see, for example, [3]–[6]), often used to introduce the concept of representing integers in base \(2\).
The idea is simple: every positive integer can be written as a sum of powers of two. Each of the six cards contains all numbers whose binary decomposition includes a specific power of two—one card for \(2^5\), another for \(2^4\), and so on down to \(2^0=1\). By indicating the cards on which the secret number appears, the participant is effectively revealing which powers of two occur in its decomposition. The “magician” merely sums those powers to reconstruct the number.
For example, if the chosen number is \(45\), it appears on the cards for \(2^5=32\), \(2^3=8\), \(2^2=4\), and \(2^0=1\). Adding these, \[32 + 8 + 4 + 1 = 45,\] the secret number is immediately determined. If \(p\) is the largest exponent of two represented among the cards, the largest number that can be guessed is \[2^{p+1}-1 = 2^{N_{card}} - 1 .\] Thus with six cards one can identify any integer from \(1\) to \(63\).
One may naturally ask whether the game can be adapted to other bases. Such variants, however, require additional information because one must also specify the coefficient multiplying each power of the base.
An elegant example is given by Sezin [7], who uses four cards containing the integers from \(1\) to \(64\) written in different colours to exploit base \(4\). Here each card corresponds to a power of \(4\), while the colour indicates whether that power enters the decomposition with coefficient \(1\), \(2\), or \(3\). Unlike the binary version—where the procedure reduces to yes/no answers depending on a number’s presence—this scheme encodes three mutually exclusive states through colour.
In the next section we extend the yes/no framework to arbitrary bases and derive a general formula for the number of cards required to guess a number in any base representation. We also show that base \(2\) is optimal: it always minimizes the number of cards needed for a given integer, and, conversely, for a fixed number of cards it allows the largest range of integers to be guessed.
In a base \(b\) different from two, it is not enough to know whether a certain power of the base appears in the decomposition of a number: one must also specify the coefficient by which that power is multiplied, which can take values from \(1\) up to \(b-1\). For example, \[23 = 2\cdot 3^2 + 1\cdot 3^1 + 2\cdot 3^0\] is the expansion of \(23\) in base \(3\).
To guess numbers using a yes/no scheme similar to Polone’s game, we therefore need a separate card for each non-zero multiple of every power of \(3\). Concretely, for each power of \(3\) we must have one card containing the numbers in which that power appears with coefficient \(1\), and another card for those where it appears with coefficient \(2\). In the example shown in Figure 2, to guess any number between \(1\) and \(26\) (that is, up to \(3^3-1\)) six cards are required: one for \(3^2\), one for \(2\cdot3^2\), one for \(3^1\), one for \(2\cdot3^1\), one for \(3^0\), and one for \(2\cdot3^0\).
In general, when numbers are represented in base \(b\), each power of \(b\) requires \((b-1)\) cards—one for each possible non-zero coefficient. If \(p\) is the highest power of \(b\) needed in the decomposition of a given number \(n\), the total number of cards \(N_{card}\) required to guess any number in this range is \[N_{card} = (b-1)\,(p+1). \label{eq:1}\tag{1}\] In Polone’s game \(b=2\), and formula 1 reduces to \[N_{card} = (2-1)\,(p+1) = p+1 .\] Because \(p = \lfloor \log_{b} n \rfloor\) (where \(\lfloor x \rfloor\) denotes the floor of \(x\)), equation 1 can also be written as \[N_{card} = (b-1)\,\bigl(\lfloor \log_{b} n \rfloor + 1\bigr). \label{eq:2}\tag{2}\]
Figure 3 shows, for bases \(b=2\) through \(10\), how the number of cards \(N_{card}\) grows with the representable integer \(n\), as given by equation 2 . For each fixed base the growth is step-like: \(N_{card}\) increases by \((b-1)\) each time \(n\) crosses a power of \(b\), reflecting the need for an additional block of \((b-1)\) cards whenever a new power enters the representation.
Figure 4 offers the complementary view: for selected integers \(n=8\) to \(16\), it plots the required number of cards as a function of the base \(b\). In this complementary view we can appreciate that the dependence on \(b\) is not always strictly decreasing for a fixed \(n\). For example, when \(n=8\) both \(b=2\) and \(b=3\) require the same number of cards, and when \(n=16\) base \(4\) requires more cards than base \(5\). Despite such local ties or reversals, base \(2\) always provides at least one of the minima of \(N_{card}\) for every integer \(n\). This statement is proved in Theorem 1 of the Appendix.
Finally, it is natural to fix the number of available cards and ask which base allows the widest range of integers to be guessed. Because each power of \(b\) requires \((b-1)\) cards, the set of integers that can be represented with \(N_{card}\) cards extends from \(1\) up to \[b^{\lfloor N_{card}/(b-1) \rfloor} - 1 ,\] where \(p\) is the largest integer power of \(b\) supported by the available cards. The floor is needed because \(p+1 = N_{card}/(b-1)\) must be an integer, and when this quotient is not itself an integer we take its integer part.
Figure 5 displays the maximum representable number as \(N_{card}\) varies, again for bases \(2\) through \(10\). These plots show that, for a fixed number of cards, the binary representation covers the greatest range of integers. The demonstration of this statement is provided in Theorem 2 of the Appendix.
Starting from the classic street performance of Giuseppe Polone, we have developed a general framework for representing integers with collections of cards (or tables) indexed by the powers of an arbitrary base \(b\). This perspective leads naturally to an explicit formula for the number of cards required to identify any given integer and highlights, both visually and theoretically, the special efficiency of base 2.
Two principal results emerge. First, for every integer \(n\), the binary representation requires the fewest cards to guarantee an unambiguous guess. Second, when the total number of cards is fixed, base 2 yields the widest range of integers that can be represented. Together these findings give precise quantitative meaning to the intuition that binary encoding is the most economical way to convey information.
Beyond their recreational charm, these observations illustrate core ideas of mathematics and computer science. The game offers a concrete entry point to positional numeral systems, logarithmic growth, and the concept of information as counted in bits. It can enrich classroom discussions, inspire exploratory projects, or simply entertain audiences of all ages. Thus a simple street trick becomes a vivid demonstration of the universal power and elegance of binary representation.
The authors are grateful to Dr.ssa Serena Capanni, her son Lorenzo, and Dr.ssa Francesca Contessini for a stimulating conversation about the story of the number-guessing game attributed to Giuseppe Polone. Their interest and insightful comments helped clarify the background of the tale and inspired the broader mathematical exploration presented in this paper.
Theorem 1. For every integer \(n>0\) and every integer base \(b>2\), \[N_{card}(2)=\bigl\lfloor \log_{2} n \bigr\rfloor + 1 \;\le\; N_{card}(b)=(b-1)\bigl[\lfloor \log_{b} n \rfloor + 1\bigr].\] Moreover, equality holds only in the following cases:
\(b=3\) and \(n=8\), where both sides equal \(4\);
\(b=3\) and \(n=2\), where both sides equal \(2\).
In all other cases the inequality is strict.
Proof. Although the claim feels intuitively reasonable, the verification is somewhat delicate because of the floor functions.
Step 1: Rewriting the inequality. Since \[(b-1)\bigl[\lfloor \log_{b} n \rfloor + 1 \bigr] =(b-1)\,\lfloor \log_{b} n \rfloor +(b-1),\] the desired inequality is equivalent to \[\lfloor \log_{2} n \rfloor \le (b-1)\,\lfloor \log_{b} n \rfloor + (b-2).\] Because \(\log_{b} n=\log_{2} n/\log_{2} b\), we can write this as \[\lfloor \log_{2} n \rfloor \le (b-1)\,\bigl\lfloor \tfrac{\log_{2} n}{\log_{2} b} \bigr\rfloor + (b-2).\] Let \[m=\Bigl\lfloor \frac{\log_{2} n}{\log_{2} b}\Bigr\rfloor , \qquad \log_{2} n = m\log_{2} b + r\log_{2} b \quad\text{with } 0 \le r < 1.\]
Step 2: Bases \(b\ge 6\). If \(n \ge b\) then \(m \ge 1\). Consider \[f(b)=\frac{b-1}{2\log_{2} b}.\] A derivative calculation shows \(f'(b)>0\) for \(b>1\), hence \(f\) is increasing and \(f(6)>1\). Thus, for all \(b \ge 6\), \[(b-1) \ge 2\log_{2} b .\] Therefore \[(b-1)m \ge 2m\log_{2} b = m\log_{2} b + m\log_{2} b \ge m\log_{2} b + r\log_{2} b = \log_{2} n .\] Since \(b-2>0\), \[\lfloor \log_{2} n\rfloor<\log_{2} n < (b-1)m + (b-2) ,\] as required.
If instead \(n<b\) we have \(m=0\), so the right–hand side equals \(b-2\). Using that \(\log_{2} b/(b-2)\) is decreasing for \(b>1\) (by an argument entirely analogous to the derivative check above) and equals \(1\) at \(b=4\), we conclude that \(\log_{2} b < b-2\) for every \(b \ge 6\). Hence \[\lfloor \log_{2} n\rfloor<\log_{2} n < \log_{2} b < b-2,\] and the claim again holds.
Step 3: Intermediate bases \(b=4\) and \(b=5\). For \(b=5\) we need \[3 + 4m > m\log_{2} 5 + \log_{2} 5 \quad\Longleftrightarrow\quad m > \frac{\log_{2} 5 - 3}{4 - \log_{2} 5} \approx -0.40 .\] Since \(m \ge 0\), this holds for all \(n\).
For \(b=4\) we obtain \[2 + 3m > m\log_{2} 4 + \log_{2} 4 \quad\Longleftrightarrow\quad m > \frac{\log_{2} 4 - 2}{3 - \log_{2} 4} = 0 .\] Thus the inequality holds for every \(n \ge 4\). When \(1 \le n \le 3\), we have \(\lfloor \log_{2} n \rfloor \in \{0,1\}\) and the right–hand side equals \((b-2)=2\), so the inequality is also satisfied.
Step 4: Base \(b=3\). Here the condition becomes \[1 + 2m > m\log_{2} 3 + \log_{2} 3 \quad\Longleftrightarrow\quad m > \frac{\log_{2} 3 - 1}{2 - \log_{2} 3} \approx 1.41 .\] Thus the inequality holds for \(m \ge 2\), i.e.for \(n \ge 9\). When \(n=8\) we have equality: \[\lfloor \log_{2} 8 \rfloor = 3 \quad\text{and}\quad 2\lfloor \log_{3} 8 \rfloor + 1 = 2\cdot 1 + 1 = 3 .\] For \(4 \le n \le 7\) we get \[\lfloor \log_{2} n \rfloor = 2, \qquad 2\lfloor \log_{3} n \rfloor + 1 = 2\cdot 1 + 1 = 3,\] so the inequality is strict.
Finally, for small \(n\) we check directly:
\(n=3\): \(\lfloor \log_{2} 3 \rfloor =1\) and \(2\lfloor \log_{3} 3 \rfloor +1=2\);
\(n=2\): \(\lfloor \log_{2} 2 \rfloor =1\) and \(2\lfloor \log_{3} 2 \rfloor +1=1\), giving equality;
\(n=1\): \(\lfloor \log_{2} 1 \rfloor =0\) and \(2\lfloor \log_{3} 1 \rfloor +1=1\).
Combining all cases, we conclude that \[\lfloor \log_{2} n \rfloor + 1 \le (b-1)\bigl[ \lfloor \log_{b} n \rfloor + 1 \bigr]\] for every integer \(n>0\) and every integer base \(b>2\), with equality occurring only when \((b,n)=(3,8)\) or \((3,2)\). ◻
Theorem 2. Let \(N_{card}\in\mathbb{N}\) and \(b>2\). Then \[2^{ N_{card}} - 1 > b^{\lfloor N_{card}/(b-1)\rfloor} - 1 .\]
Proof. Because \[b^{\,N_{card}/(b-1)} - 1 \;\ge\; b^{\,\lfloor N_{card}/(b-1)\rfloor} - 1 ,\] it is enough to show \[2^{N_{card}}-1 > b^{\,N_{card}/(b-1)}-1,\] or equivalently \[2^{N_{card}} > b^{\,N_{card}/(b-1)} .\]
Rewrite the right–hand side in base 2: \[b^{\,N_{card}/(b-1)} = 2^{\,(\log_{2} b)\,N_{card}/(b-1)} .\] Dividing \(2^{N_{card}}\) by this quantity gives \[\frac{2^{N_{card}}}{2^{(\log_{2} b)\,N_{card}/(b-1)}} = 2^{\,N_{card}\!\left(1-\frac{\log_{2} b}{\,b-1}\right)} = \bigl(2^{\,1-\frac{\log_{2} b}{\,b-1}}\bigr)^{N_{card}} .\] Thus \(2^{N_{card}} > b^{N_{card}/(b-1)}\) holds precisely when \[2^{\,1-\frac{\log_{2} b}{\,b-1}} > 1,\] that is, when \[\frac{\log_{2} b}{\,b-1} < 1 .\]
The strict decrease of the function \[g(b)=\frac{\log_{2} b}{\,b-1}, \qquad b>1,\] was established in the proof of Theorem 1. Since \(g(2)=1\) and \(g\) is decreasing, we indeed have \(g(b)<1\) for all \(b>2\). Therefore \[2^{\,1-\frac{\log_{2} b}{\,b-1}} > 1 ,\] and consequently \[2^{N_{card}} > 2^{(\log_{2} b)\,N_{card}/(b-1)} = b^{\,N_{card}/(b-1)}.\] It follows that \[2^{N_{card}} - 1 > b^{\,N_{card}/(b-1)} - 1 \ge b^{\,\lfloor N_{card}/(b-1)\rfloor} - 1 ,\] which completes the proof. ◻