Problem: if an integer n is to be chosen at random from the integers 1 to 96 , inclusive , what is the probability that n ( n + 1 ) ( n + 2 ) will be divisible by 8 ?
Rationale: "total nos of ways in which we can choose n = 96 n ( n + 1 ) ( n + 2 ) will be divisible by 8 ? case 1 : n = odd then n + 2 = odd & n + 1 will be even i . e this needs get divided by 8 , hence is a multiple of 8 so we have 8 . . 96 = 12 multiples to fill the n + 1 pos hence 12 ways case 2 : n is even then n + 2 will be even & the product will be divisible by 24 & thus 8 so nos of values that can be used for n = 2 . . . . 96 ( all even nos ) i . e 48 nos total = 48 + 12 = 60 ways so reqd p = 60 / 96 = 5 / 8 ; answer : d"
annotated_formula: divide(add(divide(96, 2), divide(96, 8)), 96)