Making any integer with four 2s (2025): Comments
Paul Dirac resolved the four 2s math puzzle by using n nested square roots and base-2 logarithms to generate any target integer using elemental operations.
By Dillip Chowdary โข Nov 08, 2026 โข Source: eli.thegreenplace.net
A classic recreational mathematics puzzle tasks solvers with constructing any given natural number using exactly four instances of the digit 2 and standard mathematical operations without introducing any additional digits, as detailed in eli.thegreenplace.net's report. The challenge historically entertained students and professional mathematicians alike by scaling in complexity across educational stages, beginning with basic elementary arithmetic and progressing toward exponents, factorials, concatenation, and gamma functions. While the puzzle was traditionally viewed as a collection of isolated arithmetic riddles for individual integers, physicist Paul Dirac devised a unified, closed-form formula in the 1920s that systematically yields any arbitrary integer.
This breakdown explores the operational mechanics behind Dirac's universal formulation, tracing how basic arithmetic expressions evolve into advanced analytical functions that solve the four 2s puzzle generally. The analysis is structured for students, educators, and software engineers interested in analytical puzzle-solving, logarithmic manipulation, and fractional exponent properties. By mapping how nested radical operations combine with base-2 logarithms, the piece demonstrates how repeated elemental operations can represent any positive integer without requiring bespoke tricks for difficult values.
Making any integer with four 2s (2025): what actually changed
The classic four 2s puzzle previously required distinct computational strategies for different target numbers, requiring solvers to guess ad hoc combinations of operators for each integer. Basic targets rely on elementary operations like addition, subtraction, multiplication, and division, such as expressing 1 as (2+2)/(2+2), 2 as (2/2)+(2/2), 3 as 22-(2/2), 4 as 2+2+2-2, 5 as 22+(2/2), and 6 as 222-2. In middle school curricula, students expand their reach with exponents and factorials to produce larger targets like 18 through 2^(2^2)+2, 28 through (2+2)!+2+2, 256 through (2+2)^(2+2), and 65536 through 2^(2^(2^2)). Concatenation allows 22 to count as two instances of the digit 2, yielding 26 from 22+2+2, 11 from 22/sqrt(2+2), and 444 from 222*2.
What changed the nature of the game from an ongoing search into a resolved mathematical question was Paul Dirac's universal formulation, documented in Graham Farmelo's biography The Strangest Man: The Hidden Life of Paul Dirac, Quantum Genius. Rather than solving difficult odd integers like 7 through specialized higher-level tools like the gamma function where 7 equals Gamma(2)+2+2+2, Dirac demonstrated that an infinite family of integers can be generated using a single structural expression. By converting the arbitrary integer n into a count of nested radical operations and resolving that count with logarithms, the requirement for individual bespoke proofs was replaced by a general analytical mechanism.
Making any integer with four 2s (2025): how it works

The core operational mechanism relies on the algebraic behavior of repeatedly taking the square root of 2. A single square root of 2 equals 2^(1/2) or 2^(2^(-1)), a nested double square root equals 2^(1/4) or 2^(2^(-2)), and a triple nested square root yields 2^(1/8) or 2^(2^(-3)). Extending this pattern, taking the square root n times produces an exponent of 2^(-n), resulting in the expression 2^(2^(-n)). Because the integer n is embedded directly as the negative exponent of an exponent of base 2, applying consecutive base-2 logarithms systematically isolates and extracts the target value.
Applying the first base-2 logarithm to 2^(2^(-n)) reduces the expression to 2^(-n). Taking a second base-2 logarithm reduces log2(2^(-n)) directly to -n, meaning that the negation of that logarithmic chain yields positive n. Because this base construction uses only one digit 2 inside the radical chain and two digits of 2 within the logarithm bases, it initially consumes three instances of the digit 2. To satisfy the four 2s rule, the outer base 2 is rewritten as sqrt(2+2), producing the final universal formula: n = -log_{sqrt(2+2)}(log2(sqrt(...n times...sqrt(2)))). For example, computing 7 requires nesting seven consecutive square roots over a single 2, evaluated inside base-2 logarithms.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Making any integer with four 2s (2025): why it matters
Dirac's formulation matters because it illustrates the transition from discrete, case-by-case recreational arithmetic to systematic functional analysis. Prior to Dirac's insight, the pursuit of complex integers like 7 or 12 served as a favorite pastime in the 1920s among university graduates and professional researchers. Solvers deployed advanced machinery, including complex numbers where 12 is calculated as |2+2*sqrt(-2)|^2, or introduced integrals, repeating fractions, and combinatorial operators to plug gaps in the natural number sequence.
By proving that nested fractional exponents can generate an arbitrary integer through logarithmic extraction, the formula demonstrates how continuous elementary functions can overcome discrete operational bottlenecks. The variable n never appears as an independent numeric symbol in the expression itself; it exists purely as an operational instruction counting the physical depth of nested square roots applied to the primary digit 2. This proves that standard foundational operators, when composed recursively, possess sufficient expressive power to construct the entire set of natural numbers from a minimal set of identical digits.
Making any integer with four 2s (2025): who is affected
The primary groups affected by this construction are mathematics educators, students, and competitive puzzle enthusiasts who use the four 2s puzzle as a pedagogical benchmark. For elementary and middle school classrooms, individual numerical exercises retain their value because working out formulations for integers from 1 through 6, or higher powers like 256 and 65536, teaches order of operations, factorial expansion, and structural logic. The presence of a universal shortcut does not diminish the instructional value of finding isolated arithmetic solutions at introductory levels.
For university-level mathematicians and competitive puzzle designers, Dirac's proof effectively terminated the search for ad hoc formulations by providing a standardized closure. Once nested radicals and logarithms are permitted under the rules of standard elemental operations, any integer target becomes immediately trivialized. Consequently, puzzle coordinators and rule makers often establish restrictive boundaries, explicitly barring logarithmic bases or infinite radical recursion, in order to keep the competition focused on combinatorial creativity rather than generic functional collapse.
Making any integer with four 2s (2025): what to watch
Observers and practitioners should watch how puzzle competitions and automated math engines define allowable operational boundaries. While Dirac's approach strictly obeys the premise of using four instances of the digit 2 without introducing other numerical symbols, purists often debate whether nesting n radicals constitutes implicit use of an external integer n. In practice, the only operational difficulty in applying the general solution is the physical notation required to clearly render and evaluate lengthy chains of nested square root signs for large numbers.
Additionally, interest continues to surround historical accounts of mid-twentieth-century physicists engaging with foundational mathematical games. The treatment of Dirac's solution within Graham Farmelo's biography highlights how quantum physicists approached everyday recreational problems with generalized mathematical frameworks. Future educational explorations are likely to focus on how similar logarithmic extraction techniques can be adapted to variations of the four 4s problem or other single-digit generation puzzles across discrete mathematics courses.
Developer Action Items
- โ Verify the claim on the official Making any integer four page (or Hacker News Front Page), not from this recap alone.
- โ Name the surface that moved โ API, policy, model, hardware, or commercial terms โ before you Slack the thread.
- โ Assign one owner a day to read the primary material and decide: this-sprint, this-quarter, or noise.
- โ Do not change production on day-one coverage. Watch the vendor changelog and one independent write-up first.
Making any integer with four 2s (2025) FAQ
How does Paul Dirac's formula generate any integer with four 2s?
Dirac's formula applies n nested square roots to the digit 2 to produce 2^(2^(-n)), then uses base-2 logarithms and the substitution 2 = sqrt(2+2) to isolate and extract the positive integer n.
How can 7 be made using four 2s without Dirac's formula?
Without Dirac's nested square roots, 7 can be made using higher-level operators like the gamma function via the expression Gamma(2)+2+2+2.
Where was the history of Paul Dirac's four 2s solution documented?
The historical account of Dirac solving the four 2s puzzle in the 1920s is documented in Graham Farmelo's biographical book The Strangest Man: The Hidden Life of Paul Dirac, Quantum Genius.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement