How many ways are there of choosing different numbers in an increasing order from {1, 2, 3, ... , 10} so that no two of the numbers are consecutive?
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.
Notice that a set of consecutive integers should have at least five elements for it to be possible to fulfill the requirement. We will therefore start counting the ways to satisfy the condition from the set 6 , 7 , 8 , 9 , 1 0 , proceeding backwards by adding another element at each iteration. By considering sequences starting from the least element of a set ( 6 in this example ) we will avoid counting contributions twice. { 6 , 7 , 8 , 9 , 1 0 } → 1 { 5 , 6 , 7 , 8 , 9 , 1 0 } ; { 5 , 6 , 7 , 8 , 9 , 1 0 } → 2 { 5 , 6 , 7 , 8 , 9 , 1 0 } → 1 { 4 , 5 , 6 , 7 , 8 , 9 , 1 0 } ; { 4 , 5 , 6 , 7 , 8 , 9 , 1 0 } ; { 4 , 5 , 6 , 7 , 8 , 9 , 1 0 } → 3 { 4 , 5 , 6 , 7 , 8 , 9 , 1 0 } ; { 4 , 5 , 6 , 7 , 8 , 9 , 1 0 } → 2 { 4 , 5 , 6 , 7 , 8 , 9 , 1 0 } → 1
The pattern is easy to notice: the contribution of a new set can be obtained from the contribution of the previous one by adding the next integer to it. The number of ways requested is 1 + ( 1 + 2 ) + ( 1 + 2 + 3 ) + ⋯ + ( 1 + 2 + 3 + 4 + 5 + 6 ) = 6 ⋅ 1 + 5 ⋅ 2 + 4 ⋅ 3 + 3 ⋅ 4 + 2 ⋅ 5 + 1 ⋅ 6 = 2 ⋅ 2 8 = 5 6 .
More generally, we see that the contribution of the set { k , k + 1 , … , n } is 1 ∑ n − 3 − k k = 2 ( n − 3 − k ) ⋅ ( n − 2 − k ) so we have to evaluate (written like this, it looks like I will sum over k the previous expression, while I will sum 2 k ⋅ ( k + 1 ) instead, since otherwise I would use a change of variables) 1 ∑ n − 4 2 k ⋅ ( k + 1 ) = 2 1 ⋅ ( 1 ∑ n − 4 k 2 + 1 ∑ n − 4 k ) = 6 ( n − 4 ) ( n − 3 ) ( n − 2 ) which gives the desired result for n = 1 0 .
Note: if you are wondering why the indices range up to n − 4 , the reason is that since you must have at least five numbers in a set constructed this way in order to be able to choose three non consecutive integers from it, the contributions "start" after the first 4 sets.