Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Discrete Structures Question
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raknarg




PostPosted: Thu Feb 20, 2014 6:30 pm   Post subject: Discrete Structures Question

I have an assignment for this class, and I've answered all the questions but one. The question asks us to prove that for all n >= 1, n(n+1)(n+2) is divisible by 6. I think I might have the idea, where in the range of n to n+2 you will always have a number divisible by 3 and divisible by 2 so they can always be factored out and turned into 6, then removed. However I'm not sure how to prove that. Can anyone help?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Feb 20, 2014 6:37 pm   Post subject: RE:Discrete Structures Question

By induction.

Assume that factors 2 and 3 exist for N. Given that, show that factors 2 and 3 exist for N+1

N(N+1)(N+2) (case n)
(N+1)(N+2)(N+3) (case n+1)

+1,+2 are common. You need to show that dropping N doesn't matter, or the factor is regained with N+3
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: