if n is an integer from 1 to 96 ( inclusive ) , what is the probability for n * ( n + 1 ) * ( n + 2 ) being divisible by 8 ?
( a ) 25 % , to be divisible by 8 the number needs to have 3 2 s in it . only a multiple of 4 can provide that . number of numbers divisible by 4 = 96 / 4 = 24 . so p ( 8 ) = 24 / 96 = 25 % .
divide(multiply(add(add(96, 2), add(1, 1)), add(1, 1)), 8)