TITLE: Integral points on varieties
QUESTION [19 upvotes]: I recently came across an interesting phenomenon which confused me slightly, concerning integral points on varieties.
For example, consider $X = \mathbb{A}_{\mathbb{Z}}^{n+1} \setminus \{0\}$, affine $n$-space over $\mathbb{Z}$ with the origin removed. Naively, one would guess that $X(\mathbb{Z})$ is the set of integers $\{ (x_0,x_1,\ldots,x_n) \in \mathbb{Z}^{n+1} \setminus \{0\}\}$.
However, some work that I have been doing on recently with universal torsors has in fact led me to believe that $X(\mathbb{Z})$ should equal $\mathbb{P}^n(\mathbb{Z})$, at least modulo the action of $\mathbb{G}_m$. That is $X(\mathbb{Z})$ is actually the set of integers $\{ (x_0,x_1,\ldots,x_n) \in \mathbb{Z}^{n+1}\setminus \{0\}\}$ such that $\gcd(x_0,x_1,\ldots,x_n)=1$.
Is there a simple explanation for why this is the case?
Thanks!
Dan

REPLY [19 votes]: Dear Daniel, here is a detailed explanation, respectfully following the sacred texts (EGA or Hartshorne).
a) First of all, $\mathbb A^{n+1}_{\mathbb Z}$ has no origin, despite our classical intuition! As a substitute, it has the prime (but not maximal) ideal $\mathcal P=(X_1,X_2,...,X_{n+1})$ and corresponding to it the integral subscheme $V=V(\mathcal P)$. And what you want to calculate is the set of $\mathbb Z$-points of
 $U=\mathbb A^{n+1}\setminus V(\mathcal P)$, i.e. the set of morphisms $Spec(\mathbb Z)\to U$. Let's do that.
b) A morphisms $f: Spec \mathbb Z \to \mathbb A^{n+1}$ corresponds to a morphism of rings 
$ev_a: \mathbb Z[X_1,X_2,...,X_{n+1}] \to \mathbb Z$ , evaluation of integral polynomials at a tuple $a=(a_1,a_2,...,a_{n+1}) \in {\mathbb Z}^{n+1} $. Call $f=f_a : Spec \mathbb Z \to \mathbb A^{n+1}$ the corresponding morphism.
c) We must ensure that the image of $f$ lies in $U$ i.e. that it is disjoint from 
$V=V(\mathcal P)$. But the points of $V$ are its generic point $(X_1,X_2,...,X_{n+1})$ and its closed points $\mathcal M_p=(X_1,X_2,...,X_{n+1}, p)$, $p$ a prime. It is enough to show that these closed points are not in the image of $f$. Equivalently, we must show that the fibre of $f$ at $\mathcal M_p$ is empty. Since this fibre is the spectrum of
$\mathbb Z / (a_1,a_2,...,a_{n+1},p)$ our condition is that this ring be zero or equivalently that the ideal $(a_1,a_2,...,a_{n+1},p)$ be zero: this will happen exactly if $p$ does not divide all ot the $a_i$'s. Since this must hold for all primes, we get:
Final result The $\mathbb Z$-points of $U=\mathbb A^{n+1}\setminus V(\mathcal P)$ are given by $(n+1)$-tuples of integers whose g.c.d. is 1.
Reminder I  have used that the fibre of a morphism of affine schemes $f:SpecB\to Spec A$ at $\mathcal M \in Specmax A$ is $Spec ( B/\mathcal M B) $.