Why is $f(n) = n + 6 \mod{1729}$ not injective? The exercise was to determine if the function $f : \mathbb{Z} \rightarrow \mathbb{Z}_{1729}, f(n) = n + 6 \mod{1729}$ is injective or not. 
My thinking was that 
$f(-7) = 1728\\ 
f(-6) = 0\\ 
f(-5) = 1\\
\vdots\\
f(0) = 6\\ 
f(1) = 7\\ 
\vdots\\
f(1722)=1728\\ 
f(1723) = 0$ 
and so on, we will get all numbers in $\mathbb{Z}_{1729}$. 
However, this turned out to be wrong, but the solution doesn't say why, though. Why is this function not injective? 
 A: There is no injective function from an infinite set to a finite one.
A: You seem to be thinking surjective, meaning that the image of $\mathbb{Z}$ under $f$ is all of $\mathbb{Z}_{1729}$. Injective means there would not be two different integers, say $n,m$ such that $f(n)=f(m)$. Equivalently, if $f(n)=f(m)$ then we must have $n=m$. 
This cannot be the case for $f$ since it repeats at least every 1729 integers. For example, 
$$
f(0)=0+6 \equiv 0 \mod 1729
$$
$$
f(0+1729)=f(1729)=1729 \equiv 0 \mod 1729
$$
In fact, this will work for any integer $n$: $f(n+1729)=f(n)$. So $f$ cannot be injective. 
A: You are definitely confusing surjective with injection. 
SURjective means "we will get all the numbers in $\mathbb Z_{1729}$".
INjective means "we will never get any number in $\mathbb Z_{1729}$ more than once".
$f(-6) = 0$ and $f(1723) = 0$ is enough to prove we get some numbers at least twice.  
So $f$ is NOT injective. 
.......
Injective means if $f: X\to Y$ then for any $k \in Y$ there is at most one $a \in X$ so that $f(a) = k$.
Surjcetive means if $f: X \to Y$ then for every $k \in Y$ there is at least one $a \in X$ so that $f(a) = k$.
So if $f(a) = k$ has solutions for every $k$ it is surjective.  If for any $k$, $f(a) = k$ does not have a solution it is not surjective.
And if $f(a) = k$ has a unique or no solution for every $k$ it is injective.  If for any$ $k$, $f(a) = $k\in \mathbb Z_{1729}$ more than one solution it is not injective.
For any $k \in \mathbb Z_{1729}$ then $f(k - 6 + n\cdot 1729)=k$.  
So for any $k$ there is more than one solution.  So it is not injective.
And for every $k$ there is at least one solution (infinitely many in fact).  So it is surjective.
