pesfunk wrote:
Hello Fluke,
I understand your question. However, I have a small doubt.
In this case when we are counting the even numbers, if they have a lot of multiples of 8 already included.
In that case, aren't we over counting the possibilities ?
Regards - Manish
Not Really!!!
f(n) = n*(n+1)*(n+2)
Now, the two cases I have mentioned above are mutually exclusive.
f(6) = 6*7*8. Divisible by 8 because 6 is even i.e. n is even
f(7) = 7*8*9. Divisible by 8 because 7 is odd and the middle term is a multiple of 8 i.e. (n+1) is multiple of 8.
f(8) = 8*9*10. Divisible by 8 because 8 is even i.e. n=even
f(6) and f(8) will be counted in the even numbers case.
f(7) will be counted in the case where we are finding the (n+1) or the middle number divisibility by 8.
Let's consider a smaller set.
If n is an integer from 1 to
10 (inclusive), what is the probability for N being divisible by 8 when N=n*(n+1)*(n+2)
n(1) = 1*2*3
n(2) = 2*3*4
n(3) = 3*4*5
n(4) = 4*5*6
n(5) = 5*6*7
n(6) = 6*7*8
n(7) = 7*8*9
n(8) = 8*9*10
n(9) = 9*10*11
n(10) = 10*11*12
Here there are total 10 cases.
n(1) not divisible by 8 because n=1(odd) and the middle number i.e. (n+1)=2 is not divisible by 8.
n(2) is divisible by 8 because n=even=2
n(3) not divisible by 8 because n=3(odd) and the middle number i.e. (n+1)=4 is not divisible by 8.
n(4) is divisible by 8 because n=even=4
n(5) not divisible by 8 because n=5(odd) and the middle number i.e. (n+1)=6 is not divisible by 8.
n(6) is divisible by 8 because n=even=6
n(7) is divisible by 8 because n=odd=7 and (n+1)=8 is divisible by 8
n(8) is divisible by 8 because n=even=8
n(9) not divisible by 8 because n=9(odd) but the middle number i.e. (n+1)=10 is not divisible by 8.
n(10) is divisible by 8 because n=even=10
How many cases are divisible by 8:
n(2) - counted for the n=even case
n(4) - counted for the n=even case
n(6) - counted for the n=even case
n(7) - counted for the n+1 divisible by 8 case
n(8) - counted for the n=even case
n(10) - counted for the n=even case
Count=6 out of total 10 possibilities. Do you see any repetitions here? No, right.
With formula, if we just find the number of even numbers from 1 to 10 and numbers divisible by 8. We should have our result.
Even numbers from 1 to 10 = ((10-2)/2)+1 = 5
Numbers from 1 to 10 that are divisible by 8= (8-8)/8+1=0+1=1
Total=5+1=6