Does there exist an elliptic curve $E/\mathbb{F}_q$ such that $\#E(\mathbb{F}_q)=a$ for any $a\in \{1,\dots,q^2 \}$?
I'm trying to use an argument where I first fix my base field $\mathbb{F}_q$ and then I must find an elliptic curve $E/\mathbb{F}_q$ where $\#E(\mathbb{F}_q)$ is equal to some constant depending on my choice of $\mathbb{F}_q$. Is there some general theorem that tells me this is always possible?
EDIT: Fixed for any $a\in \mathbb{F}_q^\times$ to $a\in \{1,\dots,q^2 \}$.
EDIT 2: What about $\#E(\mathbb{F}_q) =a \mod \ell$ for some prime $\ell \neq p$ and $a\in \mathbb{F}_l$?
Let $q$ be a prime power. Let $t$ be an integer such that $\gcd(t, q)=1$ and $|t| \leq 2 \sqrt q$, then there is an elliptic curve $E / F_q$ with $(q+1) - t$ points over $F_q$. See Waterhouse's paper (PhD thesis) "Abelian varieties over finite fields" theorem 4.1. for a more general statement.
When $q=p$, any non-zero integer $t$ such that $|t| \leq 2 \sqrt p$ must be coprime to $p$, so there is an elliptic curve $E / \mathbb F_p$ with $p+1-t$ points. This is also true when $t=0$. When $q=p$, this was proved by Deuring (1941). A modern treatment is given in Cox's book "Primes of the Form $x^2+ny^2$", theorem 14.18.