Fol all prime $p$, if $p\mid n^2$, then $p\mid n$. I want to argue by contradiction. Assume $n$ is not multiple of $p$, then $n = kp + r$ ($p>r>0$), $n^2 = k^2 p^2 + 2 r k p + r^2$. How can I prove $r^2$ isn't multiple of $p$? Or assume $n$ is not multiple of $p$, how can I prove $n^2$ isn't multiple of $p$?
-
Do you know that $p$ is a prime by definition if $p\mid ab$ imples either $p\mid a$ or $p\mid b$? – Gary May 01 '22 at 03:52
-
I want to argue by contradiction. The lemma is more general situation – overwhelm May 01 '22 at 03:58
1 Answers
You're going to have to use the fact that $p$ is prime somewhere in there, as what you want is false when $p$ is not prime. There are a couple of approaches.
Unique factorization approach:
You can factor $n$ as a product of primes, right? So $n$ is equal to a product $p_1^{e_1} \cdots p_s^{e_s}$ for unique prime numbers $p_i$ and exponents $e_i \geq 1$. What does it mean for $p$ to divide $n$? It means that $p$ shows up in the list $p_1, ... , p_n$. Think also about what the corresponding factorization of $n^2$ looks like: $n^2 = p_1^{2e_1} \cdots p_s^{2e_s}$.
Greatest common divisor approach:
Assume that $p$ divides $n^2$, but does not divide $n$. Let $D$ be the greatest common divisor of $n$ and $p$. It is a very well known fact (using the Euclidean algorithm, say), that there exist integers $x$ and $y$ such that $xn + yp = D$. In particular, since $p$ does not divide $n$, the greatest common divisor of $n$ and $p$ is $1$. So you have $xn + yp = 1$, and hence $xn^2 + ynp = n$. Under your assumption that $p$ divides $n^2$, argue using this last equation that $p$ has to also divide $n$. This yields a contradiction.

- 33,891
-
2Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque May 01 '22 at 05:20