How many points can the projection of a variety to a line omit? Let $V$ be a closed subvariety of $\mathbb{A}^n$. Let $\pi:\mathbb{A}^n\to \mathbb{A}^1$ be the projection map that forgets the last $n-1$ coordinates (say). Assume that the Zariski closure of $\pi(V)$ is $\mathbb{A}^1$. Then $\pi(V)$ must be of the form $\mathbb{A}^1\setminus S$, where $S$ is a finite set of points in $\mathbb{A}^1$. What sort of useful bound can we give on the number of points $|S|$ in $S$?
I am looking for a bound of the form  $|S|\leq (\deg V)^D$, where $D$ is a function of $n$. It would be very nice if $D$ were bounded by a polynomial on $n$. (I think I
already know how to get a horrific $D$.)
 A: It seems to me that one can bound $|S|\leq (n-1) \deg(V)$.
First, note that we can work projectively, that is, we will be able to work with the projective closure $\overline{V}\subset \mathbb{P}^n$. In the end, the points of $\overline{V}\setminus V$ will only contribute a point at infinity in $\mathbb{P}^1$, and we are not counting that point anyhow. We will write $V$ instead of $\overline{V}$ henceforth.
We can define a map $\pi_n:\mathbf{P}^n\setminus P_{0,n}\to \mathbf{P}^{n-1}$ by $\pi_n(x_0:x_1:\dotsc:x_n) = (x_0:\dotsc:x_{n-1})$, where $P_{0,n}\in \mathbf{P}^n$ is the point $(0:0:\dotsc:0:*)$. As pointed out in How many holes may a projection of an algebraic variety have?, either (a)
$\dim(\overline{\pi_n(V)})=\dim(V)$ and $\pi_n(V)$ contains
$\overline{\pi_n(V)}\setminus W$, where $W$ is a variety of dimension $\leq \dim(V)-1$ and degree $\leq \deg(V)$, or
(b) $V$ is a cone whose vertex contains $P_{0,n}$, and so $\pi_n(V)$ is closed and of dimension $\dim(V)-1$. Clearly $\deg(\overline{\pi_n(V)})\leq \deg(V)$.
We iterate: we define $\pi_{n-1}:\mathbf{P}^{n-1}\setminus P_{0,n-1}\to\mathbf{P}^{n-2}$ just as above. If we are now in case (a), we have $\dim(\overline{\pi_{n-1}(\pi_n(V))})=\dim(\overline{\pi_n(V)})$, and $\pi_{n-1}(\pi_n(V))$ contains $\pi_n(\pi_{n-1}(V))\setminus (W' \cup \overline{\pi_{n-1}(W)})$, where $\deg(W')\leq \deg(V)$ and
$\dim(W')\leq \dim(\overline{\pi_n(V)})-1$, and $W$ is as above (and is empty if we were in case (b) before). If we are in case (b), then we need not remove a new variety $W'$, and we also notice that what we must remove from $\pi_{n-1}(\overline{\pi_n(V)})$ is the variety consisting of the points of $\pi_{n-1}(W)$ whose preimage under $\pi_{n-1}$ is contained in $W$. That variety is either empty or of dimension $\leq \dim(W)-1$; its degree is presumably $\leq \deg(W)$.
We iterate further, and are done.
