Jump to content
• ### What is your GameDev Story?

• Advertisement

# Consecutive Integer proofs

This topic is 4882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

How exactly do you prove that the product of n consecutive integers is always divisible by n? (say 2 for example) Here is how far I got Let a/b be 2 consec integers. a b = a + 1 so, a * ( a + 1) = 2n a^2 + a = 2n a(a+1) = 2n What am I missing here?

#### Share this post

##### Share on other sites
Advertisement
Quote:
 Original post by GinkHow exactly do you prove that the product of n consecutive integers is always divisible by n? (say 2 for example) Here is how far I gotLet a/b be 2 consec integers.ab = a + 1so, a * ( a + 1) = 2na^2 + a = 2na(a+1) = 2nWhat am I missing here?

Well, you're on the right track. Since a and a+1 are consecutive, then one of them is even. Any even number times any other number is also even (factorization theorem). The same idea holds for any n. a(a+1)...(a+n-1)=n*k since one of the a-terms is divisible by n, so the product will be too.

#### Share this post

##### Share on other sites
a(a + 1) has to be divisible by 2 because either a is divisible by 2 or a+1 is divisible by
2.

Basically we can write any integer as 2*q + r (by definition of integer division), where r=0 or 1. So then a = 2*q + r. Then a+1 = 2*q + r + 1

So then, if r = 0, the a is divisible by 2. If r=1 then a+1 is divisible by 2. In either case a(a+1) is divisible by 2.

To prove this in general for all n you need to use induction. Are you familiar with the concept of induction?

#### Share this post

##### Share on other sites
So, what exactly would I say to finish this off? Since a or a+1 is divisible by 2, 2n | a*(a+1)?

edit : i'm familiar with induction but i have to prove it for specific numbers

#### Share this post

##### Share on other sites
Quote:
 Original post by GinkHow exactly do you prove that the product of n consecutive integers is always divisible by n? (say 2 for example) Here is how far I gotLet a/b be 2 consec integers.ab = a + 1so, a * ( a + 1) = 2na^2 + a = 2na(a+1) = 2nWhat am I missing here?
Where did the line

a * (a + 1) = 2n

come from? n is 2 in this case, right, so you're saying that a * (a + 1) = 4?

Anyway, you should think about remainders on division by n instead. You have n consecutive integers, each with a different remainder on division by n. See where you go from there.

#### Share this post

##### Share on other sites
that line is right, when n is the correct value obviously.

#### Share this post

##### Share on other sites
Homework on gamedev.net = don't do it.

#### Share this post

##### Share on other sites

This topic is 4882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

This topic is now closed to further replies.

• Advertisement
• Advertisement
• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• ### Popular Now

• 15
• 10
• 11
• 9
• 9
• Advertisement
• ### Forum Statistics

• Total Topics
634147
• Total Posts
3015785
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!