Prove if $17|n^3$ then $17|n$ Wanted to make sure my proof is correct:  
$n^3$ can be written as a product of primes $n^3=17^{e_1}p_2^{e_2}...p_k^{e_k}$
Since we have $n^3$, each exponent $e_1,e_2,...,e_k$ must be a multiple of $3$ , so we will see that $17|n$
 A: Here is another way of looking at it. A number $p$ is prime if whenever $p|ab$ we have $p|a$ or $p|b$. We know $17$ is prime.
We are given $17|n^3=n\cdot n^2$ so using this property of being a prime we have $17|n$ or $17|n^2=n\cdot n$. In the first case we are done, and in the second case we use the property again to show that $17|n$.
What you have written makes some assumptions - for example that the powers to which primes appear in a cube are all multiples of $3$ - that is true, of course, but how do you know it to be true? Also that if $17^3$ appears in the factorisation of a cube, $17$ is a factor of the cube root - how do we know that is true? In a full formal proof each step is justified.

To show that an irreducible integer (the definition we usually have of prime rational integers) is prime according to the definition above, we need Euclid's lemma.
Consider two positive integers $a$ and $b$. These will have a highest common factor $d$.
Now consider the set $\{ax+by\}$ where $x,y$ are integers, not necessarily positive. The sum of two elements in this set is an element of the set, as is the difference, as is the negative of any element in the set.
Such a set has a least positive element $c$ which is an element of the set. Clearly we have $d|c$ because $d$ is a divisor of every element in the set. $a$ and $b$ are also elements of the set.
Now notice that every element of the set is a multiple of $c$ - if say $e$ were not we can use the division algorithm to write $e=zc+f$ where $0\lt f\lt c$, $f$ would also be in the set contradicting the choice of $c$.
Since $a$ and $b$ are elements of the set we have $c|a$ and $c|b$, so $c$ is a common factor. We have $d|c$ and since $d$ is the highest common factor $c=d=ax=by$ for some choice of $x,y$.
Now assume that $p$ is prime and $p|ab$ but $a$ is not a multiple of $p$. The highest common factor of $a$ and $p$ can only be $1$ or $p$. $p$ is ruled out, so it must be $1$.
We now know that $1$ can be expressed as $1=ax+py$. Multiply this by $b$ $$b=abx+pby$$and since $p|ab$ it is a factor of both terms on the right-hand side, and we have $p|b$
A: Euclid's Lemma:
If a prime $p$ divides $ab$, then $p$ divides $a$ or $p$  divides $b.$
In our case:
$17|n^3 = 17|n(n^2)$, then $17|n$ or $17|n^2$.
1)If $17|n$, then we are done.
2)If $17|n^2$, then $17| n$ (Lemma).
