Menu Close

Find-the-gcd-n-1-n-1-




Question Number 110463 by Rio Michael last updated on 29/Aug/20
Find the gcd(n−1,n+1)
$$\mathrm{Find}\:\mathrm{the}\:\mathrm{gcd}\left({n}−\mathrm{1},{n}+\mathrm{1}\right) \\ $$
Commented by mr W last updated on 29/Aug/20
if n=odd then gcd(n−1,n+1)=2  if n=even then gcd(n−1,n+1)=1
$${if}\:{n}={odd}\:{then}\:{gcd}\left({n}−\mathrm{1},{n}+\mathrm{1}\right)=\mathrm{2} \\ $$$${if}\:{n}={even}\:{then}\:{gcd}\left({n}−\mathrm{1},{n}+\mathrm{1}\right)=\mathrm{1} \\ $$
Commented by Rio Michael last updated on 29/Aug/20
thank you sir
$$\mathrm{thank}\:\mathrm{you}\:\mathrm{sir} \\ $$

Leave a Reply

Your email address will not be published. Required fields are marked *