Interesting behaviours of $gcd(a^n+b^n, |a - b|)$

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP










up vote
4
down vote

favorite
2












I was messing around the expression $gcd(a^n+b^n, |a - b|)$, and I found that when you fix $a$ and $b$ and increase $n,$ the expression would always be constant. (Shown below)



For example, Let $a = 4$ and $b = 100$.

When $n = 1,$ $gcd(104, 96) = 4$

but when $n = 2, 3, ldots,$ $gcd(4^n+100^n, 96)$ is always $8$



Another example, let $a = 518$ and $b = 712$.

When $n = 1, 2, 3, 4, 5, ldots$

$gcd(cdots)= 28, 56, 112, 224, 224, ldots$



Can someone help with why this is true? (Or provide any counter example? Can't seem to find any with $a, b < 10^3$)



Thank you.



Try It Yourself!







share|cite













locked by quid♦ 2 days ago


This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.














  • I'm voting to close this question as off-topic because it is taken from a live programming competition, codechef.com/AUG18B/problems/GCDMOD
    – lulu
    2 days ago














up vote
4
down vote

favorite
2












I was messing around the expression $gcd(a^n+b^n, |a - b|)$, and I found that when you fix $a$ and $b$ and increase $n,$ the expression would always be constant. (Shown below)



For example, Let $a = 4$ and $b = 100$.

When $n = 1,$ $gcd(104, 96) = 4$

but when $n = 2, 3, ldots,$ $gcd(4^n+100^n, 96)$ is always $8$



Another example, let $a = 518$ and $b = 712$.

When $n = 1, 2, 3, 4, 5, ldots$

$gcd(cdots)= 28, 56, 112, 224, 224, ldots$



Can someone help with why this is true? (Or provide any counter example? Can't seem to find any with $a, b < 10^3$)



Thank you.



Try It Yourself!







share|cite













locked by quid♦ 2 days ago


This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.














  • I'm voting to close this question as off-topic because it is taken from a live programming competition, codechef.com/AUG18B/problems/GCDMOD
    – lulu
    2 days ago












up vote
4
down vote

favorite
2









up vote
4
down vote

favorite
2






2





I was messing around the expression $gcd(a^n+b^n, |a - b|)$, and I found that when you fix $a$ and $b$ and increase $n,$ the expression would always be constant. (Shown below)



For example, Let $a = 4$ and $b = 100$.

When $n = 1,$ $gcd(104, 96) = 4$

but when $n = 2, 3, ldots,$ $gcd(4^n+100^n, 96)$ is always $8$



Another example, let $a = 518$ and $b = 712$.

When $n = 1, 2, 3, 4, 5, ldots$

$gcd(cdots)= 28, 56, 112, 224, 224, ldots$



Can someone help with why this is true? (Or provide any counter example? Can't seem to find any with $a, b < 10^3$)



Thank you.



Try It Yourself!







share|cite













I was messing around the expression $gcd(a^n+b^n, |a - b|)$, and I found that when you fix $a$ and $b$ and increase $n,$ the expression would always be constant. (Shown below)



For example, Let $a = 4$ and $b = 100$.

When $n = 1,$ $gcd(104, 96) = 4$

but when $n = 2, 3, ldots,$ $gcd(4^n+100^n, 96)$ is always $8$



Another example, let $a = 518$ and $b = 712$.

When $n = 1, 2, 3, 4, 5, ldots$

$gcd(cdots)= 28, 56, 112, 224, 224, ldots$



Can someone help with why this is true? (Or provide any counter example? Can't seem to find any with $a, b < 10^3$)



Thank you.



Try It Yourself!









share|cite












share|cite




share|cite








edited 2 days ago
























asked 2 days ago









KGSH bteam Mine Team Beast O_

225110




225110




locked by quid♦ 2 days ago


This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.






locked by quid♦ 2 days ago


This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.













  • I'm voting to close this question as off-topic because it is taken from a live programming competition, codechef.com/AUG18B/problems/GCDMOD
    – lulu
    2 days ago
















  • I'm voting to close this question as off-topic because it is taken from a live programming competition, codechef.com/AUG18B/problems/GCDMOD
    – lulu
    2 days ago















I'm voting to close this question as off-topic because it is taken from a live programming competition, codechef.com/AUG18B/problems/GCDMOD
– lulu
2 days ago




I'm voting to close this question as off-topic because it is taken from a live programming competition, codechef.com/AUG18B/problems/GCDMOD
– lulu
2 days ago















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?