I saw on the internet the following Proof of Euclid's lemma, which states that if a prime number divides the product of two numbers, then it must divide at least one of the two numbers.
Since $p \mid bc$, there exists an integer $n$ such that $bc = np$. Now, assume $p\nmid b$. I.e. there are integers $k, i$ with $0< i < p$, such that $b = kp + i$
And therefore, $$np = bc = c(kp +i ) = kpc + ci \implies ci = p(n - kc)$$ So, $p$ is a factor of $ci$ and since $0 < i < k$ , $p$ must be a factor of $c$.
I am particularly confused by the last statement:
... since $0 < i < k$, $p$ must be a factor of $c$
This does not make sense to me... $i$ needs not be less than $k$.
This proof was selected as the best answer in a Yahoo question
I would be grateful if someone could explain me what is going on at the end of the proof or if it is wrong.
UPDATE: I need a proof that does not use the gcd algorithm.
I think that it was meant that $0<i<p$. However this doesn't actually help. The proof is a bit of a circular argument since we still have that $p$ divides a product and want to conclude it divides one of the factors.
The easiest way to proof Euclid's lemma involves the extended euclidean algorithm. If $p\nmid b$ then $\gcd(p,b) = 1$. So using the extended euclidean algorithm we can find $r$ and $s$ so that $rp+sb=1$. Now we multiply by $c$ to get $$rpc +sbc = c$$ Cleary $p\mid rpc$ but also $p\mid sbc$ since it was given that $p\mid bc$. So $p$ must also divide their sum, which is $c$.