Find the GCD of ( 1 9 ! + 1 9 , 2 0 ! + 1 9 ) .
Note:
GCD stands for the greatest common divisor.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Great job with your first longer proof!
FYI, the Latex for mod is a \equiv b \pmod{n}, which produces a ≡ b ( m o d n ) .
Great answer to my sense, I’m also a math enthusiast in free time but not as nearly good, I wonder, did you have all this planned out ahead of the time ?
1 9 ! + 1 9 = 1 9 ( 1 8 ! + 1 ) = x
2 0 ! + 1 9 = 1 9 ( 2 0 . 1 8 ! + 1 ) = 1 9 ( ( 1 9 + 1 ) 1 8 ! + 1 ) = 1 9 2 1 8 ! + x
By Euclid's algorithm,
g c d ( 1 9 ! + 1 9 , 2 0 ! + 1 9 ) = g c d ( 1 9 ! + 1 9 , 1 9 2 1 8 ! )
1 9 ! + 1 9 = 1 9 ( 1 8 ! + 1 ) and 1 9 ∣ 1 8 ! + 1 . By wilson theorem , we get 1 9 2 ∣ 1 9 ! + 1 9
Thus
g c d ( 1 9 ! + 1 9 , 2 0 ! + 1 9 ) = 3 6 1
I think you skipped several steps in the "By Euclid's algorithm". Can you flesh out the working? Thanks!
Log in to reply
Edited @Calvin Lin
Log in to reply
Right, that adds more explanations, but you are still missing one step. Specifically, the step that you skipped was to show that
g cd ( 1 9 2 1 9 ! + 1 9 , 1 8 ! ) = 1
This is because what you have only shown so far, is that g cd ( 1 9 ! + 1 9 , 1 9 2 1 8 ! = 1 9 2 g cd ( 1 9 2 1 9 ! + 1 9 , 1 8 ! ) .
ooohhh. typo: 381 should be 361...
How do I know when to stop. I mean there could be another common factor and how to prove it doesn't exist?
Log in to reply
Show that there is integers m, n as the coefficient of the divided number of the two as their linear combination coefficient and that their smallest result is 1 to stop there are no further steps to proceed on.
See the patterns
GCD(2!+2 , 3!+2) = 2
GCD (3!+3 , 4!+3) = 9 ( 3x3)
GCD (4!+4 , 5!+4) = 4
GCD (5!+5 , 6!+ 5) = 25 (5x5)
if even number we can take the same number And if odd number we can use quadratic
So
GCD (19!+19,20!+19) = 19x19 = 361
Sorry for idiot solutons But is it work?
Hey,this is not a solution. @Johan Kurniawan
Nice observation!
as good as a theorem
This is incorrect. Check for x = 9. gcd(9! + 9, 10! + 9) =9 and not 81.
I think it works for only prime numbers. Because for x= 11 or 13 the gcd is 121 and 169 respectively. But again for x= 15, the gcd is 15. I don't know if it will fail for some higher numbers.
I am considering like this:
Suppose g cd ( 1 9 ! + 1 9 , 2 0 ! + 1 9 ) = g . Then we have 1 9 ! + 1 9 ≡ 0 ( m o d g ) and hence 1 9 ! ≡ − 1 9 ( m o d g ) .
Note that 2 0 ! = 2 0 ⋅ 1 9 ! , so 2 0 ! ≡ − 3 8 0 ( m o d g ) and then 2 0 ! + 1 9 ≡ − 3 6 1 ( m o d g ) .
Since 2 0 ! + 1 9 ≡ 0 ( m o d g ) , we will have g = 3 6 1 .
Since, ( a , b ) = ( a − b , b ) and ( k a , k b ) = k ( a , b )
So, ( 1 9 ! + 1 9 , 2 0 ! + 1 9 ) = ( 1 9 ! + 1 9 , 2 0 ! − 1 9 ! ) = 1 9 ( 1 8 ! + 1 , 1 9 ! )
From Wilson's theorem we have
1 8 ! ≡ − 1 ( m o d 1 9 ) ⟹ 1 9 ∣ ( 1 8 ! + 1 )
So, the smallest non-unity divisor of 1 8 ! + 1 is 1 9 . Therefore, ( 1 8 ! + 1 , 1 9 ! ) = 1 9 .
So, finally we have ( 1 9 ! + 1 9 , 2 0 ! + 1 9 ) = 1 9 ∗ 1 9 = 3 6 1 .
Solution without Wilson's theorem
Using Euclid's GCD algorithm:
2 0 ! + 1 9 | L 1 |
1 9 ! + 1 9 | L 2 |
1 9 ⋅ 1 9 ! | L 3 = L 1 − L 2 |
1 9 2 | L 4 = 1 9 L 2 − L 3 |
It's then easy to see that G C D ( 2 0 ! + 1 9 , 1 9 ! + 1 9 ) = G C D ( 1 9 ⋅ 1 9 ! , 1 9 2 ) = 1 9 2 .
GCD(19!+19, 20!+19) = 19* GCD(18!+1, 20* 18!+1) ........(A)
GCD(18!+1, 20*18!+1) = GCD(18!+1, 19!) .....(B) (why?) since GCD(a,b) = GCD(a, b-a)
now Wilson's theorem suggests 18! = -1 (mod 19) hence 18!+1 will be 0 (mod 19) and 19! also contains 19.
so GCD(18!+1, 19!) = 19 ...........................(C)
and from A, B and C ans is 19*19=361.
To generalise, for any prime p , we have that ( p ! + p , ( p + 1 ) ! + p ) = p 2 . Why?
p ! + p = p ( ( p − 1 ) ! + 1 ) and ( p + 1 ) ! + p = ( p + 1 ) p ( p − 1 ) ! + p = p ( ( p + 1 ) ( p − 1 ) ! + 1 ) . Note that ( p + 1 ) ( p − 1 ) ! + 1 ≡ 1 ( p − 1 ) ! + 1 = ( p − 1 ) ! + 1 (mod p ). According to Wilson's Theorem, p ∣ ( p − 1 ) ! + 1 and thus p ∣ ( p + 1 ) ( p − 1 ) ! + 1 as well. This means p 2 ∣ p ( ( p − 1 ) ! + 1 ) and p 2 ∣ p ( ( p + 1 ) ( p − 1 ) ! + 1 ) .
Best Ans : Let 19! + 19 = a , 20! + 19 = 19!+ 19 + 19^2x 18! = a+ 361x18! Use GCD(a , a+b) = GCD(a ,b) whichever theorem you may call to get required GCD = GCD ( 19! + 19 , 361x18!) = 19xGCD(18!+ 1 , 19x18!) = 361xGCD{(18!+1)/19 , 18!} = 361 x 1 = 361 as GCD{(18!+1) , 18!} = 1
(Note that (18!+1)/19 is an integer by Wilson's theorem
19!+19 = nq » 20(19!)= 20nq - 380
20!+19=mq » 20(19!)=mq-19
Equating the two equations and rearranging gives: (20n-m)q=361
Which implies that maximum possible q is 361 when (20n-m) =1
Problem Loading...
Note Loading...
Set Loading...
(I'm only a math enthusiast in my free time, and this is the first longer proof I've ever written. Sorry if anything is unclear or different from accepted standards)
I used a combination of simple division, Euclid's GCD algorithm, and Wilson's Theorem to solve the problem.
We can first see that both 1 9 ! + 1 9 and 2 0 ! + 1 9 are divisible by 19. Therefore G C D ( 2 0 ! + 1 9 , 1 9 ! + 1 9 ) = 1 9 ∗ G C D ( 1 8 ! ( 2 0 ) + 1 , 1 8 ! + 1 ) .
To apply Euclid's GCD algorithm to these numbers, we need to find ( 1 8 ! ( 2 0 ) + 1 ) m o d ( 1 8 ! + 1 ) . ( 1 8 ! + 1 ) ∗ 1 9 is the largest multiple of ( 1 8 ! + 1 ) that doesn't exceed 1 8 ! ( 2 0 ) + 1 so
( 1 8 ! ( 2 0 ) + 1 ) m o d ( 1 8 ! + 1 ) = 1 8 ! ( 2 0 ) + 1 − ( 1 8 ! + 1 ) ( 1 9 ) = 1 8 ( 2 0 ) + 1 − 1 8 ! ( 1 9 ) − 1 9 = 1 8 ! − 1 8
Therefore G C D ( 1 8 ! ( 2 0 ) + 1 , 1 8 ! + 1 ) = G C D ( 1 8 ! + 1 , 1 8 ! − 1 8 )
One more iteration of Euclid's gives us G C D ( 1 8 ! − 1 8 , 1 9 )
If and only if 18! - 18 is divisible by 19, then ( 1 8 ! − 1 8 + 1 9 ) = ( 1 8 ! + 1 ) must be also.
A slight rearrangement of Wilson's Theorem tells us that n! + 1 is divisible by n if n is prime. 19 is prime, therefore G C D ( 1 8 ! − 1 8 , 1 9 ) = 1 9
Substituting 19 into the GCD equivalence found earlier, we can see that 1 9 ∗ G C D ( 1 8 ! ( 2 0 ) + 1 , 1 8 ! + 1 ) = 1 9 2 = 3 6 1