  Let $d\ge4$ and $c\in(-d,d)$ be relatively prime integers. We show that for
any sufficiently large integer $n$ (in particular $n>24310$ suffices for $4\le
d\le 36$), the smallest prime $p\equiv c\pmod d$ with $p\ge(2dn-c)/(d-1)$ is
the least positive integer $m$ with $2r(d)k(dk-c)\ (k=1,\ldots,n)$ pairwise
distinct modulo $m$, where $r(d)$ is the radical of $d$. We also conjecture
that for any integer $n>4$ the least positive integer $m$ such that
$|\{k(k-1)/2\ \mbox{mod}\ m:\ k=1,\ldots,n\}|= |\{k(k-1)/2\ \mbox{mod}\ m+2:\
k=1,\ldots,n\}|=n$ is the least prime $p\ge 2n-1$ with $p+2$ also prime.
