3

Prove that $\gcd(5^{98} + 3, \; 5^{99} + 1) = 14$.

I know that for proving the $\gcd(a,b) = c$ you need to prove

  1. $c|a$ and $c|b$

  2. $c$ is the greatest number that divides $a$ and $b$

Number 2 is what I'm struggling with. Does anybody have any ideas?

7 Answers7

5

Hint $\rm\ mod\ {n\!+\!3\!}:\,\ \color{#C00}{n\!\equiv -3}\:\Rightarrow\: \color{#0A0}{5n\!+\!1}\!\equiv 5\color{#C00}{n}\!+\!1\equiv 5(\color{#C00}{-3})\!+\!1\equiv \color{#0A0}{-14}.\ $ Therefore

$\rm\qquad\ \ \ \ (n\!+\!3, \color{#0A0}{5n\!+\!1}) = (n\!+\!3,\ \color{#0A0}{5n\!+\!1}\ mod\ n\!+\!3) = (n\!+\!3, \color{#0A0}{14})\ \ [ = 14\ \ if\ \ 14\mid n\!+\!3]$

since we have $\rm\ (a,\color{#0A0}b) =\, (a,\, \color{#0A0}b\ mod\ a)\ \ $ [modular gcd law, heart of Euclidean algorithm]

Yours is special case $\rm\ n = 5^{98}.$ Then $\rm\:14\mid n\!+\!3\:$ since $\rm\:2,7\mid 5^{98}\!+\!3,\:$ since $\rm\:n\!+\!3\:$ is even, and by little Fermat $\rm\:mod\ 7\!:\ \color{#C00}{5^6\equiv 1}\:\Rightarrow\: 5^{98}\!\equiv 5^{2+6(16)}\!\equiv 5^2 (\color{#C00}{5^6})^{16}\!\equiv 5^2\color{#C00}{1}^{16}\!\equiv \color{#0A0}4\:$ so $\rm\:5^{98}\!+\!3\equiv \color{#0A0}4\!+\!3\equiv 0.$

Remark $\ $ More generally, a similar proof shows that, for any polynomial $\rm\:f(x)\in \Bbb Z[x],$

$\rm\qquad mod\ n\!-\!a\!:\ n\equiv a\:\Rightarrow\: f(n)\equiv f(a)\ \Rightarrow\ (n\!-\!a,f(n)) = (n\!-\!a,f(a))\:$

In particular $\rm\:(n\!+\!3,f(n)) = (n\!+\!3,f(-3)),\:$ so $\rm\:f(n) = 5n\!+\!3\:$ gives your case.

If such congruence arithmetic is unfamiliar then you can replace it by the Factor Theorem, which implies that when $\rm\:f(n)\:$ is divided by $\rm\:n\!-\!a\:$ it has remainder $\rm\:f(a),\:$ since, by the polynomial Division Algorithm, $\rm\:f(x) = (x\!-\!a)g(x) + k,\:$ for $\rm\:k\in\Bbb Z,\ g\in \Bbb Z[x].\:$ Evaluation at $\rm\:x = a\:$ shows $\rm\:k = f(a).\:$ Then evaluating at $\rm\:x = n\:$ shows $\rm\:f(n) = (n\!-\!a) g(n) + f(a),\:$ hence $\rm\:f(n)\:$ and $\rm\:f(a)\:$ have the same remainder when divided by $\rm\:n\!-\!a,\:$ since they differ by an integer multiple of $\rm\:n\!-\!a.\:$

Math Gems
  • 19,574
  • 1
    The step $(5^{98} + 3, -14) = 14$ could use some more explanation, since generally $(n, 14) \neq 14$. – TMM Mar 30 '13 at 15:11
  • @TMM $\rm\ (a,b) = b\iff b\mid a\ \ $ – Math Gems Mar 30 '13 at 15:19
  • @MathGems: That does not answer my comment. I said that you cannot say $(5^{98} + 3, -14) = 14$ without explanation. For the current version of the answer, you have only shown that $\gcd(5^{98} + 3, 5^{99} + 1) | 14$, not that they are equal. – TMM Mar 30 '13 at 15:23
  • @MathGems, how do you know that $7\mid (5^{98}+3)$? as it's obvious that $5^{98}+3$ is even – lab bhattacharjee Mar 30 '13 at 15:24
  • @TMM That's easy by little Fermat - see my added remark. I wanted to leave something for the OP to do, but since it has already been posted, I added it for completeness. – Math Gems Mar 30 '13 at 15:36
  • @MathGems, you lost me: how can we know some higher power of $,2,,,7,$ doesn't divide both arguments $,5^{98}+3,,,5^{99}+1,$ ? – DonAntonio Mar 30 '13 at 16:01
  • @Don We proved that $\rm:d = (n!+!3,5n!+!1) = (n!+!3,14)\mid 14.:$ Therefore, $\rm:d\mid 14,:$ Generally $\rm:(n!+!3,14) = (n!+!3,2)(n!+!3,7),:$ so it is easy to figure out which divisor of $,14,$ the gcd equals. $\ $ – Math Gems Mar 30 '13 at 16:20
  • I missed that part, @MathGems . Thanks and + 1, of course. – DonAntonio Mar 30 '13 at 16:25
  • @Don Thanks to you and lab to. It is good for the site to have readers help to improve answers by mentioning points that would be clearer with elaboration. – Math Gems Mar 30 '13 at 16:31
  • @lab Thanks for the feedback. I've elaborated on that (see prior comments). – Math Gems Mar 30 '13 at 16:32
4

Hint: for the part you're struggling with, note $\gcd(a,b) = \gcd(a-b, b)=\gcd(a-5b, b)$.

Macavity
  • 46,381
1

Hint: Use the Euclidean algorithm

Belgi
  • 23,150
1

First of all, $$5\cdot(5^{98}+3)-1\cdot(5^{99}+1)=14$$

$$\implies (5^{98}+3,5^{99}+1)\mid 14$$

Now both the numbers are even $\implies 2\mid (5^{98}+3,5^{99}+1) $

Using Fermat’s Little theorem $5^6\equiv1\pmod 7$

$\implies 5^{98}=(5^6)^{16}\cdot5^2\equiv 25\pmod 7\equiv-3\implies 7\mid (5^{98}+3)$

and $5^{99}\equiv(5^6)^{16}\cdot5^3\equiv125\pmod 7\equiv-1 \implies 7\mid (5^{99}+1)$

$\implies 7\mid (5^{98}+3,5^{99}+1) $

$\implies (5^{98}+3,5^{99}+1)$ is divisible by lcm$(2,7)=14$

  • And the very first line establishes the part the Original Poster had problems with, namely that if $c$ divides both $5^{98}+3$ and $5^{99}+1$, then $c$ divides $14$. – Jeppe Stig Nielsen Mar 30 '13 at 19:21
1

What you write is a correct definition of the GCD. We can, in fact, compute it in the manner you describe by finding the prime factorisation.

Prime factorisation

We factorise the two numbers. In this case, we find $$5^{98}+3=2^2 \cdot 7 \cdot 261031 \cdot 1926487 \cdot 46776900545688835975094119 \cdot 479085229840977695707830010807$$ and $$5^{99}+1=2 \cdot 3^3 \cdot 7 \cdot 23 \cdot 67 \cdot 5167 \cdot 5281 \cdot 595123 \cdot 190771747 \cdot 874300184250616439267985523227691404297001.$$ (Computed using Alpertron.)

From here, we can "read off" the GCD as $2 \cdot 7=14$, since none of the larger primes divide both numbers. In general, $$\gcd(a,b)=\prod_{\text{prime } p} p^{\min(x_p,y_p)}$$ where $x_p$ and $y_p$ are respectively the largest non-negative integers such that $p^{x_p}$ and $p^{y_p}$ divides $a$ and $b$, respectively.

As you might know, computing the prime factorisation of numbers is generally considered hard. If the numbers you had were much larger, factoring them might not have been possible (on today's hardware). Fortunately, for computing the GCD there is a much more efficient method...

Euclid's Algorithm

Euclid's Algorithm is an efficient method for computing the GCD of two numbers by recursively using the identity $$\gcd(a,b)=\gcd(a-b,b).$$ It is one of the most important algorithms in number theory, from both a theoretical and practical viewpoint.

This is what the other answers are pointing at, and is probably what your teacher intends that you learn by asking you this question.

  • Hollie Mollie! I had never, ever met such huge primes in the flesh...I'm overwhelmingly honoured and, of course, +1 . – DonAntonio Mar 30 '13 at 15:54
0

Are you allowed to use Fermat's Little theorem?

$5^{\phi(14)} = 5^6 \equiv 1 \mod 14$

$5^{98} \equiv 5^{96}5^2 \equiv 25 \equiv -3 \mod 14$ so $14|5^{98} + 3$

and $5^{99} \equiv -3*5 \equiv -15 \equiv -1 \mod 14$ so $14|5^{99} + 1$

So $14$ is a common divisor.

Hmm, but how to show it is the greatest common divisor?

Well, we know $14|\gcd(5^{98} + 3, 5^{99} + 1)$

And we can see $5 \not \mid 5^{98} + 3$ nor $5^{99}+1$

so $\gcd(5^{98} + 3, 5^{99} + 1) = \gcd(5^{98} + 3, [5^{99} + 1] - 5[5^{98} + 3])$

$= \gcd(5^{98} + 3, [5^{99} + 1] - [5^{99} + 15]) = \gcd(5^{98} + 3, - 14)$

$\gcd(5^{98} + 3, 14)$

So $\gcd(5^{98} + 3, 5^{99} + 1)|14$ and $14|\gcd(5^{98} + 3, 5^{99} + 1)$.

So $14 = \gcd(5^{98} + 3, 5^{99} + 1)$.

fleablood
  • 124,253
0

By euclid's algorithm $$\begin{align}gcd(5^{98}+3,5^{99}+1) &= gcd(5^{98}+3,5^{99}-1-5*(5^{98}-3)) \\ & =gcd(5^{98}+3,14)\end{align}$$Now we can see that 2 divides $5^{98}+3$. Also $5^3$ is -$1 (mod 7)$. Therefore $5^{98}=5^2*5^{96}=4(mod 7)$. So $5^{98}+3=0(mod 7)$. Hence 14 divides $5^{98}+3$. So $gcd(5^{98}+3,14)=14.$