Let $\mathbb F\_q$ be a finite field and $n$ an integer.



> 
> What is the minimal degree $d = d(q,n)$ of a polynomial $f \in \mathbb F\_q[X\_1,\dots,X\_n]$ such that the set $Z(f)$ of zeros of $f$ in the affine space $\mathbb F\_q^n$ has cardinality $q^n-1$, that is misses exactly one point?
> 
> 
> 


It is clear that $d$ is finite, more precisely $d(q,n) \leq n(q-1)$. Indeed, for $f = \prod\_{i=1}^n \prod\_{\alpha \in \mathbb F\_q^\ast} (X\_i-\alpha)$, $Z(f)$ is the complement of the origin. 


It is also easy to see that $d(q,n) \geq q$, because if $f$ is a polynomial of degree $d<q$, the cardinality of $Z(f)$ is divisible by the characteristic $p$ of $\mathbb F\_q$ (Chevalley-Warning), and $\leq d q^{n-1}$ (Schwartz-Zippel), which gives two independent proofs that it cannot be $q^n-1$.


One has $d(2,2)=2$ (e.g. $f(x,y)=xy$ has three zeros) and $d(2,3)=3$ (the zeros of the degree 3 polynomial $f(x,y,z)=1+x+y+z+xy+xz+yz+xyz$ are everything but the origin, and it is not hard to see that you can't do that with a degree 2 polynomial). 


But what is the value of $d$ in general?



Hypersurface missing just one point
It's $n(q-1)$. We must have


$$\sum\_{x\_1,\dots,x\_n \in \mathbb F\_q}f(x\_1,\dots,x\_n)=f(0,\dots,0) \neq 0$$


but


$$\sum\_{x\_1,\dots,x\_n \in \mathbb F\_q} \prod\_i x\_i^{e\_i}$$


vanishes unless each $e\_i$ is a positive multiple of $q-1$, so vanishes for all monomials of degree $<n(q-1)$, so unless the degree of $f$ is at least $n(q-1)$ that sum is zero.


