For n(n+1) to be divisible by 5, either n or n+1 must be divisible by 5
I. calculate p
Till 600, we have 120 multiples of 5. Each multiple will account for two pairs of n(n+1)
For example: For 5, we have (4,5) & (5,6)
So Total favorable outcomes = 2*120 = 240
Total outcomes =600
p = 240/600 = 2/5
2. calculate q
From 1 to 100 there are 4 multiples of 25. Possible pairs 7 listed below:
(24,25),(25,26),(49,50),(50,51),(74,75),(75,76),(100,99)
similarly for every 100 integers, there will be 7 such pairs.
So, for 600 integers, no. of possible outcomes = 6 * 7 = 42
Total outcomes =600
q = 42/600 = 7/100 ~ 8/100 = 4/25
Bunuel
A computer is randomly generating an integer n between 1 and 600, inclusive.Select for p the probability that n(n + 1) is divisible by 5, and select for q the probability that n(n − 1) is divisible by 25.