Polynomial with many integer but no other rational solutions?

Is it true that if a (multivariate) polynomial has infinitely many integer solutions, then it also has a non-integer rational solution?

My motivation comes from this approach to Hilbert's tenth problem for the rationals.
There it was shown that the (non-polynomial) $$2^{x^2}-y$$ only has integer solutions over $$\mathbb Q$$.
I'm also interested to know what happens if we only want to force some of the variables to be integers, like just $$x$$ in $$2^x-y$$, but $$y$$ can take other rational values too.

• Poonen's writings on Diophantine definability of $\mathbb{Z}\subset \mathbb{Q}$ may be useful. – virkkunen May 24 at 9:57
• Faltings rules out affine subsets of abelian varieties. I think if we accept Bombieri-Lang then if there is an example of general type there also must be an example not of general type. So we could start by asking if there is an affine K3 surface over $\mathbb{Q}$ that contains no rational curves over $\mathbb{Q}$ and has infinitely many $\mathbb{Q}$-points. – virkkunen May 24 at 10:11
• This question actually looks quite tricky and is intimately related to various conjectures in arithmetic geometry (Vojta's conjecture, Manin's conjecture,...). – Daniel Loughran May 24 at 10:23
• Interesting question. Might it be worth generalizing (more-or-less) as follows: Let $V\subseteq\mathbb A^n_{\mathbb Z}$ be an affine variety, i.e., the locus of vanishing of a finite set of polynomials in $\mathbb Z[x_1,\ldots,x_n]$. Is it true that if $V(\mathbb Z)$ is Zariski dense in $V$, then $V(\mathbb Q)\smallsetminus V(\mathbb Z)$ is Zariski dense in $V$? (If not, for what sorts of varieties is it true.) – Joe Silverman May 24 at 15:07
• If X(Z) is infinite and equal to X(Q) for some affine X, this would contradict the following conjecture by Mazur: If X is a variety over Q, the real closure of X(Q) has finitely many connected components. There are plenty of cases where Mazur's conjecture is known to hold, which gives examples. – Pasten May 25 at 12:10

This is a partial answer which highlights some of the subtleties of this question. I will use algebraic geometry language as this is the correct set up for such questions.

First, this question is only really interesting for affine varieties as for projective varieties, every rational point is an integral point.

I take the following set-up. Let $$U$$ be a smooth affine variety over $$\mathbb{Q}$$. I consider the opposite question: does there exist $$U$$ such that $$U(\mathbb{Z})$$ is infinite and $$U(\mathbb{Z}) = U(\mathbb{Q})$$?

So I show there no such examples in dimension $$1$$ and discuss dimension $$2$$, assuming some standard conjectures. I let $$U \subset X$$ be a smooth projective compactification.

First recall that we say that $$U$$ satisfies weak approximation at a prime $$p$$ if $$U(\mathbb{Q})$$ is dense in $$U(\mathbb{Q}_p).$$

Lemma

If $$U$$ satisfies weak approximation at some large enough prime $$p$$, then $$U(\mathbb{Z}) \neq U(\mathbb{Q})$$.

Proof By the Lang-Weil estimates, for all sufficiently large primes $$p$$ we have $$U(\mathbb{F}_p) \neq X(\mathbb{F}_p)$$. Providing $$U$$ satisfies weak approximation at $$p$$, I can therefore choose a rational point whose reduction modulo $$p$$ lies in $$(X \setminus U)(\mathbb{F}_p)$$. Such a rational point does not even lie in $$U(\mathbb{Z}_p)$$, let alone $$U(\mathbb{Z})$$.

Now consider the case $$\dim U = 1$$. If $$g(X) = 0$$ then $$U$$ satisfies weak approximation at all primes. If $$g(X) \geq 2$$, then $$X(\mathbb{Q})$$ is finite by Faltings' theorem. If $$g(X) = 1$$ then $$U(\mathbb{Z})$$ is finite by Siegel's Theorem. So here there is no example.

Now consider the case $$\dim U = 2$$. I expect this question is a birational invariant, so we may assume that $$X$$ is minimal, so we just go through the Enriques–Kodaira classification of surfaces. I won't do this in detail here, but it seems like no examples can arise.

For example, any geometrically rational or K3 surface is conjectured to satisfy weak approximation at all sufficiently large primes, so these arn't allowed. (This rules out a potential suggestion from the comments). If $$X$$ has general type, then conjecturally $$X(\mathbb{Q})$$ is not Zariski dense. We thus reduce to the case of dimension $$1$$, which was covered above.

• Ha!! I was typing a comment with the same sort of generalization while you were typing your answer. But I hadn't gotten to the sort of result that you have. Nice. Although as usual, I think it's better to talk about Zariski dense sets, rather than finite versus infinite set. – Joe Silverman May 24 at 15:10
• I don't think you need weak approximation for $\dim(U)=1$ and $g(X)=0$. Even without the assumption that $U$ is smooth, let $X$ be a smooth projective curve that is birational over $\mathbb Q$ to $U$. The assumption that $U(\mathbb Z)$ is infinite means that $X(\mathbb Q)\ne\emptyset$ (since there is a Zariski open $U_0\subset X$ isomorphic to $U$, and the finitely many excluded points can be ignored.). But given one point $P_0\in X(\mathbb Q)$ with $g(X)=0$, we get an isomorphism $X\to\mathbb P^1$ defined over $\mathbb Q$, so $X(\mathbb Q)\setminus U_0(\mathbb Z)$ is Zariski dense. – Joe Silverman May 24 at 18:52
• To me, taking $\mathbf Z$-points of a variety over $\mathbf Q$ doesn't make sense. You can do this for a scheme over $\mathbf Z$, but it depends on the choice of model. (It seems you're thinking of a choice of embedding into $\mathbf A^n$ or $\mathbf P^n$, which also works, but that is not intrinsic to the given variety.) – R. van Dobben de Bruyn May 25 at 3:25
• Yes obviously one needs to choose a model over $\mathbb{Z}$. Since $U$ is stipulated to be affine (with implicitly a given embedding) there is a natural model given by the closure of $U$ inside $\mathbb{A}^n_{\mathbb{Z}}$. – Daniel Loughran May 25 at 9:10

Expanding on some of the comments, I think that Vojta's conjecture will imply a strong result related to your question. First I'm going to reformulate the question in terms of Zariski density, which I think is more natural, since it can be applied inductively to reduce to the case of lower dimensional varieties.

Set-Up: Let $$K$$ be a number field, let $$R$$ be a ring of $$S$$-integers in $$K$$, let $$X/K$$ be a (smooth) projective variety, let $$H\subset X$$ be an ample divisor defined over $$K$$, and let $$U=X\smallsetminus H$$ be the affine subvariety of $$X$$ that is the complement of $$H$$. Choose an affine embedding $$\phi:U\hookrightarrow \mathbb A^n$$ defined over $$K$$. This allows us to talk about the $$R$$-integral points of $$U$$ relative to $$\phi$$, which we denote by $$U_\phi(R) = \phi^{-1}\bigl( \phi(U)(R) \bigr).$$

Question: Does $$\text{U_\phi(R) is Zariski dense in U} \quad\Longrightarrow\quad \text{X(K)\smallsetminus U_\phi(R) is Zariski dense in X?}$$

Observation: Assume that Vojta's conjecture is true. If $$X$$ has Kodaira dimension $$\kappa(X)\ge0$$, then the question has an affirmative answer, for the silly reason that the conjecture implies in this case that $$U_\phi(R)$$ is never Zariski dense in $$U$$! More generally, again assuming Vojta's conjecture, the question has an affirmative answer for the same silly reason if there is an integer $$m\ge1$$ such that $$\mathcal K_X\otimes\mathcal O_X(nH)$$ is ample.

So if there are any examples for which the question has a negative answer, they must (conjecturally) be found using a variety of Kodaira dimension $$-\infty$$ and an effective ample divisor $$H$$ that isn't "too" ample.

• This is a nice observation. Just to tie into my answer: Very often for varieties of Kodaira dimension $-\infty$ one expects that weak approximation holds at all but finitely many primes (e.g. for Fano varieties, or more generally rationally connected varieties). So this leaves the pool of potential counter-examples very small indeed! – Daniel Loughran May 25 at 9:17
• @DanielLoughran Under the minimal model conjecture, all varieties of Kodaira dimension -infinity are birational to Fano fiber spaces, so they have a birational map to some nonnegative Kodaira dimension variety with rationally connected fibers. I believe one can check that this birational fibration is unique, thus defined over Q. The fiber through a generic integral point will be a rationally connected variety with a rational point, thus conjecturally satisfies weak approximation, so has more rational points than integral points. – Will Sawin May 25 at 18:21

This is just a long comment, but it feels natural to look at the $$a_{ij}$$ defined via $$\sum_{i,j \geq 0} a_{i,j} x^i y^k = \frac{1}{P(x,y)}$$ where $$P(x,y)=0$$ has infinitely many integer solutions. (Assuming (0,0) is not a solution).