Greatest common divisor | Relatively prime

In summary, the claim is that n! + 1 and (n+1)! + 1 are relatively prime. Proving this using mathematical induction is a possible method, as demonstrated by the base case (n=1) and the induction hypothesis (assuming the statement is true for n=k). However, further steps are required to prove the statement for n=k+1. Another approach suggested is to use proof by contradiction, assuming that n! + 1 and (n+1)! + 1 are not relatively prime and showing that this leads to a contradiction. This can be done by considering a prime number or any integer greater than 1 that divides both numbers.
  • #1
kingwinner
1,270
0
Claim: n! + 1 and (n+1)! + 1 are relatively prime.

How can we prove this? Can we use mathematical induction?
Base case: (n=1)
gcd(2,3)=1
Therefore, the statement is true for n=1.

Assuming the statement is true for n=k: gcd(k! + 1,(k+1)! + 1)=1 (induction hypothesis), we need to show that it's true for n=k+1. But I am stuck here. How can we use the induction hypothesis to prove this?

Or am I even on the right track thinking of using induction?

Thanks for any help!
 
Physics news on Phys.org
  • #2
kingwinner said:
How can we prove this?

Reduce mod k = n! + 1.
 
  • #3
CRGreathouse said:
Reduce mod k = n! + 1.
I have no background about modular arithmetic right now. It is an exercise from the first chapter of my book about "divisibility" and "relative primes". How can we prove it without assuming knowledge about modular arithmetic?
 
Last edited:
  • #4
Try a proof by contradiction: Suppose that n! + 1 and (n + 1)! +1 are not relatively prime. Let p be a prime number that divides both numbers. Then p divides the difference, and so ... (Can you do the rest?). (Or if you haven't covered prime numbers yet, let d be any integer greater than 1 that divides both numbers and then continue as above.)

HTH

Petek
 
  • #5
kingwinner said:
I have no background about modular arithmetic right now. It is an exercise from the first chapter of my book about "divisibility" and "relative primes". How can we prove it without assuming knowledge about modular arithmetic?

Write (n+1)! + 1 in terms of n! + 1.
 
  • #6
Petek said:
Try a proof by contradiction: Suppose that n! + 1 and (n + 1)! +1 are not relatively prime. Let p be a prime number that divides both numbers. Then p divides the difference, and so ... (Can you do the rest?). (Or if you haven't covered prime numbers yet, let d be any integer greater than 1 that divides both numbers and then continue as above.)

HTH

Petek

CRGreathouse said:
Write (n+1)! + 1 in terms of n! + 1.
I am not sure how to express (n+1)! + 1 in terms of n! + 1, the best I can think of is
(n+1)! + 1 = (n+1) n! +1

Proof by contradiction:
Suppose d is an integer greater than 1 that divides both n! + 1 and (n + 1)! +1
=> d divides (n + 1)! - n! = (n+1) n! -n! = n!(n+1-1) = (n!)n
i.e. d divides (n!)n
I am trying to reach a contradiction, but where is it??
 
Last edited:
  • #7
kingwinner said:
I am not sure how to express (n+1)! + 1 in terms of n! + 1, the best I can think of is
(n+1)! + 1 = (n+1) n! +1

Good first step: you've written it in terms of n!. Now you want to write it in terms of k = n! + 1, so replace all instances of n! by (k - 1) and expand.
 
  • #8
CRGreathouse said:
Good first step: you've written it in terms of n!. Now you want to write it in terms of k = n! + 1, so replace all instances of n! by (k - 1) and expand.
OK!
(n+1)! + 1 = (n+1) n! +1

Let k= n! + 1 (=> n! = k-1)
Then (n+1)! + 1 = (n+1) n! +1 = (n+1)(k-1) +1
= nk -n +k -1 +1
=n (n! +1) - n + (n! +1)

But I still don't see where the "contradiction" is...
 
  • #9
Hi kingwinner! :smile:
kingwinner said:
(n+1)! + 1 = (n+1) n! +1

ok, now subtract n! + 1 from that. :wink:
 
  • #10
tiny-tim said:
Hi kingwinner! :smile:


ok, now subtract n! + 1 from that. :wink:

That's exactly what I did in post #6, but I can't find my contradiction...
 
  • #11
kingwinner said:
That's exactly what I did in post #6, but I can't find my contradiction...
kingwinner said:
… Suppose d is an integer greater than 1 that divides both n! + 1 and (n + 1)! +1
=> d divides (n + 1)! - n! = (n+1) n! -n! = n!(n+1-1) = (n!)n
i.e. d divides (n!)n
I am trying to reach a contradiction, but where is it??

oh, sorry, I missed that :redface:

ok, if a prime d divides the difference, then d | (n!)n, so d | n!, so … :smile:
 
  • #12
tiny-tim said:
ok, if a prime d divides the difference, then d | (n!)n, so d | n!, so … :smile:

Actually Petek was right, I haven't read the chapter about "primes" yet, so I assume no results about primes, so I let d to be any integer greater than 1 that divides both numbers. How should I continue?

But by the way, why if d is a prime and d | (n!)n => d | n! ?
One theorem in the later chapters says: If p is a prime, then p|(abc) => p|a OR p|b OR p|c.

Thanks!
 
  • #13
kingwinner said:
But by the way, why if d is a prime and d | (n!)n => d | n! ?
One theorem in the later chapters says: If p is a prime, then p|(abc) => p|a OR p|b OR p|c.

Yup … d | (n!)n => d | n! or d | n …

but if d | n, then d | n! anyway. :wink:
 
  • #14
tiny-tim said:
Yup … d | (n!)n => d | n! or d | n …

but if d | n, then d | n! anyway. :wink:

But I think the converse is false.
d | (n!)n => d|n or d|(n-1) or d|(n-2) or...or d|2 or d|1 or d|n
=> d|n or d|(n-1) or d|(n-2) or...or d|2 or d|1
 
  • #15
I agree :smile:

but all you need is d | n! :wink:
 
  • #16
Actually you are right. I don't know what I was thinking before.

d | (n!)n => d | n! or d | n
If d | n!, then d | n!
If d | n, then d | n!
So d | (n!)n => d | n! or d | n => d | n!

But we don't know what "n" is, so there does not seem to be any contradiction...?
 
  • #17
kingwinner said:
… d | n!

But we don't know what "n" is, so there does not seem to be any contradiction...?

ah, but you started with …
kingwinner said:
Proof by contradiction:
Suppose d is an integer greater than 1 that divides both n! + 1 and (n + 1)! +1

so … ? :wink:
 
  • #18
The claim is n! + 1 and (n+1)! + 1 are relatively prime for ALL n E N.

So to use proof by contradiction, we assume that
there exists SOME n E N such that n! + 1 and (n+1)! + 1 are not relatively prime.

But we don't know what that "n" is. It could be 1000, or 10205.

d | n! => n! = d z for some z E Z where d is a prime. I don't see anything contradictory with this. Prime factors are allowed in the factorization, right?
 
  • #19
If you have shown that d|n!, then the contradiction arises from the assumption that d also divides n! + 1 (since consecutive integers are relatively prime). However, it does not follow that d|(n)(n!) implies that d|n!. For example 32|(6)(6!), but 32 does not divide 6!.

This problem is trickier than I thought when I gave the above hint.

Petek
 
  • #20
kingwinner said:
The claim is n! + 1 and (n+1)! + 1 are relatively prime for ALL n E N.

So to use proof by contradiction, we assume that
there exists SOME n E N such that n! + 1 and (n+1)! + 1 are not relatively prime.

Yes, and that means there is a prime d dividing both of them,

and you proved that that d divides n!.

So you have d | n! + 1 and (n+1)! + 1 and n!

(if you still haven't got it … if n = 4, can d divide both 24 and 25? :wink:)
 
  • #21
Petek said:
If you have shown that d|n!, then the contradiction arises from the assumption that d also divides n! + 1 (since consecutive integers are relatively prime). However, it does not follow that d|(n)(n!) implies that d|n!. For example 32|(6)(6!), but 32 does not divide 6!.

This problem is trickier than I thought when I gave the above hint.

Petek

OK, I follow your arguments that IF d|n!, then we're done.

But as you said "it does not follow that d|(n)(n!) implies that d|n!", then what should I do instead?

Thanks!
 
  • #22
Petek said:
… However, it does not follow that d|(n)(n!) implies that d|n!. For example 32|(6)(6!), but 32 does not divide 6!.
kingwinner said:
But as you said "it does not follow that d|(n)(n!) implies that d|n!", then what should I do instead?

If d is prime, d|(n)(n!) does imply that d|n! :rolleyes:
 
  • #23
OK, I think that I now have a valid solution. Here're some hints:

Use the Euclidean algorithm to derive the following identity:

(n + 1)! + 1 = (n - 1)(n! + 1) + (n! + 1 - n)

(or just simplify the RHS of the equation to verify the equality).

Conclude that if d divides both (n + 1)! + 1 and n! + 1, then d divides n! +1 - n. Using the techniques discussed in this thread, show that this implies that d divides n. It's already been shown above that d|n gives a contradiction.

HTH

Petek
 
Last edited:
  • #24
tiny-tim said:
If d is prime, d|(n)(n!) does imply that d|n! :rolleyes:

Correct, but the OP hadn't covered prime numbers when solving this problem.

Petek
 
  • #25
Petek said:
OK, I think that I now have a valid solution. Here're some hints:

Use the Euclidean algorithm to derive the following identity:

(n + 1)! + 1 = (n - 1)(n! + 1) + (n! + 1 - n)

(or just simplify the RHS of the equation to verify the equality).

Conclude that if d divides both (n + 1)! + 1 and n! + 1, then d divides n! +1 - n. Using the techniques discussed in this thread, show that this implies that d divides n. It's already been shown above that d|n gives a contradiction.

HTH

Petek
I haven't learned Euclidean algorithm yet...and also, I fail to see why (n + 1)! + 1 = (n - 1)(n! + 1) + (n! + 1 - n). I tried simplifying the RHS but I got n! n instead of (n + 1)! + 1.

And also, to get a contradiction, I think we need d|(n!) instead of d|n
 
Last edited:
  • #26
kingwinner said:
I haven't learned Euclidean algorithm yet...and also, I fail to see why (n + 1)! + 1 = (n - 1)(n! + 1) + (n! + 1 - n). I tried simplifying the RHS but I got n! n instead of (n + 1)! + 1.

kingwinner, why are you bothering with this? :confused: The equation you found yourself …
kingwinner said:
Proof by contradiction:
Suppose d is an integer greater than 1 that divides both n! + 1 and (n + 1)! +1
=> d divides (n + 1)! - n! = (n+1) n! -n! = n!(n+1-1) = (n!)n
i.e. d divides (n!)n
… is much simpler. :smile:
 
  • #27
kingwinner said:
I haven't learned Euclidean algorithm yet...and also, I fail to see why (n + 1)! + 1 = (n - 1)(n! + 1) + (n! + 1 - n). I tried simplifying the RHS but I got n! n instead of (n + 1)! + 1.

And also, to get a contradiction, I think we need d|(n!) instead of d|n

Sorry about that. The equation should be

(n + 1)! + 1 = n(n! + 1) + (n! + 1 - n)

and everything else I wrote is OK (I hope). I just mentioned the Euclidean algorithm to motivate how I derived the equation. Finally, it was already pointed out that d|n implies d|n!.

Petek
 
  • #28
tiny-tim said:
kingwinner, why are you bothering with this? :confused: The equation you found yourself …

… is much simpler. :smile:

@tiny-tim,

The difficulty is deriving a contradiction from d|n(n!) without using the theorem that p|ab implies p|a or p|b, with p prime. It's easy if you can use that theorem, but seems to require additional reasoning if you can't. Or perhaps you do have an easier argument?

Petek
 
  • #29
Petek said:
Sorry about that. The equation should be

(n + 1)! + 1 = n(n! + 1) + (n! + 1 - n)

and everything else I wrote is OK (I hope). I just mentioned the Euclidean algorithm to motivate how I derived the equation. Finally, it was already pointed out that d|n implies d|n!.

Petek

(n+1)! + 1 = n (n! +1) - n + (n! +1) = (n+1)(n! +1) - n
=> n = (n+1)[n! +1] - [(n+1)! + 1]
By assumption, d divides both (n + 1)! + 1 and n! + 1
=> d divides any integer linear combination of (n + 1)! + 1 and n! + 1
=> d divides (n+1)[n! +1] - [(n+1)! + 1]
=> d|n
=> d|(n!) (since a|b => a|(bc) for any c E Z and n! = n (n-1)! )
So d|(n!) and d|(n! +1) where d>1 <-----contradiction
Thus, no integer greater than 1 divides both n! + 1 and (n + 1)! +1.


(so I think the key point is to express "n" as a linear combiation of (n + 1)! + 1 and n! + 1)

Are my reasonings here correct?
 
Last edited:
  • #30
Looks good, but let me review the details tomorrow.

Petek
 
  • #31
kingwinner,

"Upon further review", your solution is correct and yes, the key was to express n as a linear combination of (n + 1)! + 1 and n! + 1.

Petek
 
  • #32
Petek said:
kingwinner,

"Upon further review", your solution is correct and yes, the key was to express n as a linear combination of (n + 1)! + 1 and n! + 1.

Petek
Hrm. I think simply using the Euclidean algorithm (or a very slight adjustment) to compute the GCD works out to doing the same thing.
 
  • #33
Hurkyl said:
Hrm. I think simply using the Euclidean algorithm (or a very slight adjustment) to compute the GCD works out to doing the same thing.

See my post #23 in this thread.

Petek
 
  • #34
Petek said:
See my post #23 in this thread.

Petek
One never has to talk about divisibility or anything -- just finish computing the GCD with Euclidean's algorithm and get 1.
 
  • #35
Petek said:
kingwinner,

"Upon further review", your solution is correct and yes, the key was to express n as a linear combination of (n + 1)! + 1 and n! + 1.

Petek
Thanks for the confirmation. :)

Now I'm interested in the method of proof by contradiction about assuming d to be a PRIME (as you said originally).

The claim is n! + 1 and (n+1)! + 1 are relatively prime for ALL n E N.
So to use proof by contradiction, we should assume that
there exists SOME n E N such that n! + 1 and (n+1)! + 1 are not relatively prime.
i.e. Suppose that for SOME n E N, d is an integer greater than 1 that divides both n! + 1 and (n + 1)! +1
As shown above, this leads to a correct proof and I'm perfectly fine with it.

But why instead we can assume that d is a "prime" without any loss of generality? (i.e. why don't we have to check the case where d is NOT prime and show that it also leads to contradiction? Why is it sufficient to check only for the case where d is prime?)

Thanks!
 
<h2>1. What is a greatest common divisor (GCD)?</h2><p>A greatest common divisor (GCD) is the largest positive integer that divides two or more numbers without any remainder. It is also known as the greatest common factor (GCF) or highest common factor (HCF).</p><h2>2. How is the GCD calculated?</h2><p>The GCD can be calculated using various methods, such as prime factorization, Euclid's algorithm, or the binary GCD algorithm. These methods involve finding the common factors of the given numbers and then selecting the largest one.</p><h2>3. What is the significance of the GCD in mathematics?</h2><p>The GCD is an important concept in number theory and has many applications in mathematics, such as simplifying fractions, finding least common multiples, and solving linear Diophantine equations. It also plays a crucial role in cryptography and computer science algorithms.</p><h2>4. What does it mean for two numbers to be relatively prime?</h2><p>Two numbers are relatively prime if their GCD is 1. In other words, they have no common factors other than 1. For example, 15 and 28 are relatively prime because their GCD is 1, while 12 and 18 are not relatively prime because their GCD is 6.</p><h2>5. How can we determine if two numbers are relatively prime?</h2><p>To determine if two numbers are relatively prime, we can calculate their GCD using one of the methods mentioned above. If the GCD is 1, then the numbers are relatively prime. Another method is to check if the numbers share any common prime factors. If they do not, then they are relatively prime.</p>

1. What is a greatest common divisor (GCD)?

A greatest common divisor (GCD) is the largest positive integer that divides two or more numbers without any remainder. It is also known as the greatest common factor (GCF) or highest common factor (HCF).

2. How is the GCD calculated?

The GCD can be calculated using various methods, such as prime factorization, Euclid's algorithm, or the binary GCD algorithm. These methods involve finding the common factors of the given numbers and then selecting the largest one.

3. What is the significance of the GCD in mathematics?

The GCD is an important concept in number theory and has many applications in mathematics, such as simplifying fractions, finding least common multiples, and solving linear Diophantine equations. It also plays a crucial role in cryptography and computer science algorithms.

4. What does it mean for two numbers to be relatively prime?

Two numbers are relatively prime if their GCD is 1. In other words, they have no common factors other than 1. For example, 15 and 28 are relatively prime because their GCD is 1, while 12 and 18 are not relatively prime because their GCD is 6.

5. How can we determine if two numbers are relatively prime?

To determine if two numbers are relatively prime, we can calculate their GCD using one of the methods mentioned above. If the GCD is 1, then the numbers are relatively prime. Another method is to check if the numbers share any common prime factors. If they do not, then they are relatively prime.

Similar threads

  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
8
Views
842
  • Linear and Abstract Algebra
Replies
2
Views
852
  • Calculus and Beyond Homework Help
Replies
2
Views
902
  • Linear and Abstract Algebra
Replies
5
Views
2K
Replies
10
Views
1K
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
9
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
918
Back
Top