PROVED (LEAN)
This has been solved in the affirmative and the proof verified in Lean.
Is there an entire non-linear function $f$ such that, for all $x\in\mathbb{R}$, $x$ is rational if and only if $f(x)$ is?
This is Problem 2.31 in
[Ha74], where it is attributed to Erdős.
More generally, if $A,B\subseteq \mathbb{R}$ are two countable dense sets then is there an entire function such that $f(A)=B$?
Solved by Barth and Schneider
[BaSc70], who proved that if $A,B\subset\mathbb{R}$ are countable dense sets then there exists a transcendental entire function $f$ such that $f(z)\in B$ if and only if $z\in A$. In
[BaSc71] they proved the same result for countable dense subsets of $\mathbb{C}$.
View the LaTeX source
This page was last edited 29 December 2025.
Additional thanks to: Boris Alexeev, Dustin Mixon, and Terence Tao
When referring to this problem, please use the original sources of Erdős. If you wish to acknowledge this website, the recommended citation format is:
T. F. Bloom, Erdős Problem #226, https://www.erdosproblems.com/226, accessed 2026-01-16