---
title: Obfuscated Natural Number Game
url: https://www.emergentmind.com/topics/obfuscated-natural-number-game
type: topic
---

# Obfuscated Natural Number Game

The expression **Obfuscated Natural Number Game** does not denote a single canonical mathematical object. In recent arXiv usage, it appears both as the name of a specific Lean 4 benchmark obtained by obfuscating the Natural Number Game and as an expository label for several number-theoretic and combinatorial games in which an underlying natural-number structure is hidden, redistributed, or only partially revealed. In these different settings, the hidden object may be a prime factorization, a base-$b$ expansion, an online ordering constraint, an increasing random tuple, or a formal proof state; what persists are sharply defined invariants such as binomial parity, total variation distance, positional digits, Sprague–Grundy values, or Lean type structure [2605.00677][1411.1334][2510.01844][2311.16084][1502.02849][2109.00117][2309.01231].

## 1. Terminological scope

The most specific contemporary use of the term is the Lean benchmark introduced to evaluate architectural reasoning under identifier obfuscation. In broader expository use, the same label has been attached to several mathematically unrelated games whose common feature is the concealment of arithmetic structure behind local rules or limited observations.

| Usage | Core mechanism | Source |
|---|---|---|
| Lean 4 ONNG benchmark | Randomized identifiers in a closed theorem-proving environment | [2605.00677] |
| Divisor/exponent game | Primewise absolute differences of exponents via $Z(a,b)$ | [1411.1334] |
| Card reconstruction game | Yes/no card membership reveals base-$b$ digits | [2510.01844] |
| Blind number sequencing | Online placement of random numbers into ordered slots | [2311.16084] |
| Numbers-on-foreheads game | Increasing tuples with nearly indistinguishable subsets | [1502.02849] |
| Generalized Bergman / arithmetic impartial games | Local recurrence rewrites or arithmetic move rules on $\mathbb{N}$ | [2109.00117], [2309.01231] |

A common misconception is that the phrase names a single standardized recreational puzzle. The literature instead supports a plural reading: it is a family resemblance term whose instances differ substantially in state space, observability model, and objective.

## 2. Divisors, exponent differences, and the Cobeli–Zaharescu field

A particularly number-theoretic instance begins from the map
$$
Z(a,b):=\frac{ab}{(\gcd(a,b))^2}.
$$
If $a=p^s$ and $b=p^t$ for a fixed prime $p$, then
$$
Z(p^s,p^t)=p^{|s-t|},
$$
so the transformation acts prime-by-prime as an absolute difference of exponents. Writing
$$
n=\prod_{i=1}^{k} p_i^{\alpha_i},
$$
the associated exponent vector is $a^{(0)}=(\alpha_1,\alpha_2,\dots,\alpha_k)$, and the induced local rule is
$$
\nu_p(a_{m+1,n})=|\nu_p(a_{m,n+1})-\nu_p(a_{m,n})|.
$$
The principal game starts from Row $m=0$ equal to the infinite sequence of primes $(p_1,p_2,p_3,\dots)$ and defines
$$
a_{m+1,n}:=Z(a_{m,n},a_{m,n+1}),
$$
producing a triangular or honeycomb field whose left edge is $d_m:=a_{m,1}$ [1411.1334].

Because the top row consists of primes, all exponents remain in $\{0,1\}$, so every entry in every row is squarefree. The dynamics are Ducci-like at the exponent level: for each fixed prime $p_k$, the exponent profile evolves exactly as an absolute-difference process started from a monomial seed. This yields a proved analog of Gilbreath’s conjecture. If $\omega(n)$ denotes the number of prime factors of $n$, then
$$
\omega(d_m)=2^{\delta_m},
$$
where $\delta_m\in\mathbb{N}$ and, more precisely,
$$
\delta_m=\log_2\omega(d_m)
$$
equals the number of $1$s in the binary expansion of $m$. The same row invariant holds everywhere:
$$
\omega(a_{m,n})=\omega(d_m)\qquad\text{for all }n\geq 1.
$$
Hence every entry in row $m$ is a product of exactly $2^{\delta_m}$ distinct primes [1411.1334].

The entire row admits an explicit formula. With
$$
S_m:=\left\{r\in\{0,\dots,m\}:\binom{m}{r}\equiv 1\pmod 2\right\},
$$
one has
$$
a_{m,n}=\prod_{r\in S_m} p_{n+r}.
$$
Equivalently,
$$
\nu_{p_k}(a_{m,n})=
\begin{cases}
1,&\text{if }\binom{m}{k-n}\text{ is odd},\\
0,&\text{otherwise.}
\end{cases}
$$
This is the Sierpiński–Pascal structure underlying the field. In the $\mathbb{F}_2$ polynomial model, if a finitely supported $0$–$1$ sequence is encoded as $P_{e^{(0)}}(X)$, then the difference operator becomes multiplication by $(1+X)$:
$$
P_{e^{(m)}}(X)=P_{e^{(0)}}(X)(1+X)^m.
$$
For $m=2^s$,
$$
(1+X)^{2^s}=1+X^{2^s}\quad\text{in }\mathbb{F}_2[X],
$$
which explains the power-of-two periodicity patterns in prime-exponent renderings [1411.1334].

The game is “obfuscating” only in a limited sense. Later rows mix neighboring prime supports and obscure the initial row locally, but the process preserves strong global invariants such as squarefreeness and rowwise constancy of $\omega$. The paper also notes that from a single later row one cannot in general recover the original sequence, because absolute differences discard directional information.

## 3. Positional-card reconstruction in arbitrary base

Another mathematically precise use of the label concerns the classical “guess my number” card game generalized from base $2$ to any integer base $b$. The hidden integer $n$ is recovered from yes/no answers about membership in printed cards. In the binary version, there is one card for each power $2^j$, and $n$ belongs to the $2^j$ card exactly when the $j$-th binary digit is $1$, equivalently when
$$
\left\lfloor \frac{n}{2^j}\right\rfloor \bmod 2 = 1.
$$
Reconstruction is immediate:
$$
n=\sum_{j=0}^{p} b_j 2^j,
$$
where $b_j\in\{0,1\}$ records the answer on the $2^j$ card. With cards for $2^0$ through $2^p$, one represents all integers from $1$ up to $2^{p+1}-1$, and the required card count is
$$
N_{\mathrm{card}}(2)=\lfloor \log_2 n\rfloor+1
$$
for a specified target $n$ [2510.01844].

For general base $b$, every integer has an expansion
$$
n=\sum_{j=0}^{p} a_j b^j,\qquad a_j\in\{0,1,\dots,b-1\}.
$$
Because the framework keeps answers strictly binary, digit $a_j$ is identified by using $(b-1)$ separate cards for the position $b^j$, one for each nonzero coefficient $c\in\{1,\dots,b-1\}$. The card $C_{j,c}$ contains precisely those integers satisfying
$$
n\in C_{j,c}\iff \left\lfloor \frac{n}{b^j}\right\rfloor \bmod b = c.
$$
This gives the exact formulas
$$
k_b(n)=(b-1)(\lfloor \log_b n\rfloor+1)
$$
for the number of yes/no cards needed to recover a given integer $n$, and
$$
M_b(k)=b^{\lfloor k/(b-1)\rfloor}-1
$$
for the largest determinable integer with $k$ cards [2510.01844].

The central optimality result is that binary is best in both directions. For every $n>0$ and every integer base $b>2$,
$$
\lfloor \log_2 n\rfloor+1\leq (b-1)(\lfloor \log_b n\rfloor+1),
$$
with equality only for $(b,n)=(3,8)$ and $(3,2)$. Likewise, for every fixed card count $k$ and every $b>2$,
$$
2^k-1>b^{\lfloor k/(b-1)\rfloor}-1.
$$
The paper interprets this as an information-theoretic efficiency statement: each yes/no answer contributes one bit, and the binary scheme uses those bits directly as positional coefficients. Multi-valued response variants, including a base-$4$ colored version, can reduce the number of physical cards to $p+1$, but the paper’s formulas and optimality results are explicitly stated for yes/no cards [2510.01844].

## 4. Blind sequencing as an online obfuscation problem

A different stochastic formulation appears in **Blind Number Sequencing**, which models the TikTok “20 number challenge.” There are $N$ empty slots, random numbers arrive one at a time, and each number must be placed immediately so that the final list is strictly increasing from left to right. The paper studies the continuous model
$$
X_1,\dots,X_N \stackrel{\mathrm{i.i.d.}}{\sim} \mathrm{Uniform}(0,1),
$$
which is mathematically equivalent to the discrete $0$–$999$ setting by scaling. Obfuscation here is temporal rather than notational: future values are hidden, so each placement decision must be made online under uncertainty [2311.16084].

A strategy is encoded by threshold functions $\sigma_k$ for subproblems of size $k$, with thresholds
$$
0=\alpha_{k,0}<\alpha_{k,1}<\cdots<\alpha_{k,k}=1.
$$
If the first draw $x$ is placed in slot $k$ of an $n$-slot problem, the remaining game splits into subproblems of sizes $k-1$ and $n-k$, and the win probability satisfies the Bellman-type recursion
$$
p_0=1,
$$
$$
p_n=\sum_{k=1}^{n} \binom{n-1}{k-1} p_{k-1}p_{n-k}
\int_{\alpha_{n,k-1}}^{\alpha_{n,k}} x^{k-1}(1-x)^{n-k}\,dx.
$$
Equal spacing,
$$
\alpha^{ES}_{k,j}=j/k,
$$
is greedy-optimal for maximizing the probability that the current partial order is correct, but it is not globally optimal for eventual success [2311.16084].

The optimal policy is risk-tolerant rather than greedily local. Defining
$$
f_{n,k}(x)=\binom{n-1}{k-1}p_{k-1}p_{n-k}x^{k-1}(1-x)^{n-k},
$$
the optimal rule chooses the slot $k$ maximizing $f_{n,k}(x)$, and adjacent thresholds satisfy
$$
f_{n,k}(\alpha_{n,k})=f_{n,k+1}(\alpha_{n,k}).
$$
This yields the explicit formula
$$
\alpha_{n,k}=
\left[
1+\frac{p_k p_{n-k-1}}{p_{k-1}p_{n-k}}\cdot\frac{n-k}{k}
\right]^{-1}.
$$
For $N=20$, the equal-spacing strategy has
$$
p^{ES}_{20}\approx 1/9{,}651 \approx 1.036\times 10^{-4},
$$
whereas the optimal risk-tolerant policy has
$$
p^{RT}_{20}\approx 1/7{,}980 \approx 1.253\times 10^{-4},
$$
a factor of about $1.2095$, described in the paper as about a $21\%$ improvement. For $N=40$, the reported factor is about $1.4617$. Structurally, the optimal policy shrinks the end bins; for large $n$, the first and last bins are about $60\%$ of an equal-spacing bin, reflecting deliberate avoidance of early extreme placements [2311.16084].

## 5. Indistinguishability, local rewrites, and arithmetic impartial games

Several additional constructions fit the same broad pattern of hiding arithmetic information behind constrained local views. They do not define one unified game, but together they show how widely the obfuscation motif extends in discrete mathematics.

**Numbers-on-foreheads.** In the dealer–gambler setting, a dealer samples a strictly increasing $n$-tuple of natural numbers
$$
X_1< X_2<\cdots<X_n\quad\text{a.s.}
$$
and player $i$ sees all coordinates except $X_i$. The objective is to make any two equal-size subsets $X_S$ and $X_T$ nearly indistinguishable in total variation:
$$
\delta(X_S,X_T)\leq \epsilon.
$$
The paper proves existence of such distributions with
$$
\max_i X_i \leq T_{n-2}(\Theta(1/\epsilon)),
$$
where $T_0(x)=x$ and $T_{m+1}(x)=2^{T_m(x)}$, and also proves matching lower bounds of the same tower height up to constants in the top exponent. The same total variation quantity exactly measures betting advantage in an associated identification game, which is why the construction yields approximate timing implementations in extensive-form game theory [1502.02849].

**Generalized Bergman Game.** Here the state is a finite-support tuple of nonnegative integers attached to a non-increasing positive linear recurrence sequence with coefficients $c_1\geq c_2\geq \cdots \geq c_L\geq 1$. The dominating root $\beta>1$ of
$$
P(x)=x^L-c_1x^{L-1}-\cdots-c_L
$$
defines a canonical base-$\beta$ expansion. Legal states are those whose every length-$L$ window is lexicographically smaller than $(c_1,\dots,c_L)$. The game uses local carry and split moves implementing the recurrence identity
$$
\beta^L=c_1\beta^{L-1}+\cdots+c_L.
$$
Every play terminates at the unique legal tuple representing the same integer, the longest possible play from an initial state with $n$ summands has length $\Theta(n^2)$, the shortest play lies between $\Omega(n)$ and $O(n^2)$, and the maximum index reached during play is $O(n)$ [2109.00117].

**SALIQUANT and NONTOTIENT.** These impartial normal-play games live directly on $\mathbb{N}$. In SALIQUANT, a move from $n$ subtracts a non-divisor:
$$
\mathrm{Options}(n)=\{n-k:1\leq k<n,\ k\nmid n\}.
$$
The Sprague–Grundy function satisfies $g(n)=(n-1)/2$ for odd $n$, $g(2^b)=2^{b-1}-1$, and, more generally, for $n=(2a+1)2^b$ one has
$$
g((2a+1)2^b)=(2a+1)2^{b-1}-\frac{d+1}{2}
$$
for some divisor $d\mid (2a+1)$. In NONTOTIENT, the only move is
$$
n\mapsto n-\varphi(n),
$$
so the game is a no-choice chain and the Sprague–Grundy value is the parity of the iteration length to reach $1$. If $C(n)$ is the least $i\geq 0$ with $g^i(n)=1$, then
$$
SG(n)=C(n)\bmod 2,
$$
and the paper proves, among other structural identities,
$$
C(4n)=C(2n)+1.
$$
These games are not “obfuscated” in the same sense as identifier randomization, but they exhibit the same theme of simple local arithmetic rules generating unexpectedly rigid global structure [2309.01231].

## 6. The Lean 4 ONNG benchmark and architectural reasoning

The most explicit and current technical meaning of **Obfuscated Natural Number Game** is the benchmark introduced to test whether theorem-proving systems can reason from formal structure alone. The benchmark starts from the Lean 4 Natural Number Game, a self-contained progression of proofs about the natural numbers built from Peano-style axioms and definitional extensions, intentionally avoiding external libraries such as `mathlib` and relying on a restricted set of basic tactics. The paper defines **Architectural Reasoning** as the ability to synthesize formal proofs using exclusively local definitions, axioms, theorems, and limited tactics within a closed theory, while excluding semantic knowledge of names, external repositories, and high-level automated tactics [2605.00677].

ONNG is produced by obfuscating all identifiers in the Natural Number Game. The noise parameter is
$$
\lambda\in\{0.0,0.2,0.4,0.6,0.8,1.0\},
$$
with $\lambda=0.0$ corresponding to the original game and $\lambda=1.0$ to fully randomized identifiers. The character-level perturbation probability $P$ is mapped from $\lambda$ by an exponential schedule. Operationally, the augmenter applies substitution with probability $P$ per character, insertion with probability $0.4P$ per inter-character position, and deletion with probability $0.3P$ per character, while preserving non-emptiness and Lean validity. The implementation uses `nlpaug RandomCharAug`; type signatures, arities, dependency order, and the dependency graph are preserved, but names, operators, definitions, and theorems are randomized. Prompts exclude hints, docstrings, and comments and contain only the obfuscated local context, the target theorem, and a brief list of permitted tactics. Verification is done by the Lean 4 kernel, and the environment is explicitly closed-world [2605.00677].

The benchmark comprises **68 problems across eight modules**: Addition, Implication, Algorithm, Multiplication, Power, Advanced Addition, Less-Than-or-Equal, and Advanced Multiplication. The primary reported metrics are
$$
A=\frac{N_{\text{solved}}}{N_{\text{total}}},
$$
with $N_{\text{total}}=68$, and Average Time in seconds. The latency tax is
$$
\Delta t=t_{\text{obf}}-t_{\text{orig}},
$$
and the paper also discusses the robustness ratio
$$
R=\frac{A_{\text{obf}}}{A_{\text{orig}}}.
$$
Each model is run five independent times per noise level. The evaluated systems are GPT-4o, Claude-Sonnet-4.5, DeepSeek-R1, GPT-5, and DeepSeek-Prover-V2 [2605.00677].

| Model | Correct Rate ANOVA $p$-value | Average Time ANOVA $p$-value |
|---|---:|---:|
| GPT-4o | 0.0242* | 0.0004* |
| Claude-Sonnet-4.5 | 0.0001* | 0.0000* |
| DeepSeek-R1 | 0.1573 | 0.0000* |
| GPT-5 | 0.0863 | 0.0001* |
| DeepSeek-Prover-V2 | 0.3077 | 0.0000* |

The reported empirical pattern is a **universal latency tax** under obfuscation together with a **divergence in robustness**. General-purpose models show statistically significant degradation in Correct Rate as $\lambda$ increases, whereas reasoning-focused models do not show a statistically significant drop. The paper interprets this as evidence that identifier obfuscation suppresses semantic pattern matching and exposes whether a model can reconstruct meaning from types, local equations, and previously proved lemmas alone. It also identifies limitations: type signatures may still leak structure, models may recognize isomorphism with Peano arithmetic, the benchmark covers only 68 problems on $\mathbb{N}$, and Lean tactic familiarity is itself a learned competence [2605.00677].

In this benchmark-specific sense, the Obfuscated Natural Number Game is not primarily a recreational number game at all. It is a formal stress test for reasoning without semantic cues. The broader mathematical uses of the phrase make clear, however, that the same conceptual template recurs across several domains: a natural-number object is transformed so that local access becomes opaque, while deep structural invariants remain available to analysis.

Source: https://www.emergentmind.com/topics/obfuscated-natural-number-game