Even a set can be honest, why not you?

Calvin calls a set of any five consecutive positive integers (each less than 100) as honest if their product is not divisible by 840.

If the probability that a given set of any five consecutive positive integers (each less than 100) is honest can be expressed as a b \frac{a}{b} , where a a and b b are coprime positive integers, then find the value of a + b a+b .


The answer is 123.

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.

3 solutions

Brock Brown
Dec 14, 2016

I did this in a not so honest way...

Python 3

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
def prod(numbers):
    result = 1
    for n in numbers:
        result *= n
    return result
def honest(numbers):
    return prod(numbers) % 840 != 0
count = 0
samples = 0
for i in range(1, 100 - 4):
    numbers = (i,i+1,i+2,i+3,i+4)
    if honest(numbers):
        count += 1
    samples += 1
from fractions import Fraction as frac
ratio = frac(count, samples)
answer = ratio.numerator+ratio.denominator
print (answer)

Nice use of computer science to solve the problem.👍👍👍

Indraneel Mukhopadhyaya - 4 years, 6 months ago
Ashish Menon
Oct 24, 2017

840 = 2 3 × 3 × 5 × 7 840 = 2^3 × 3 × 5 × 7 . Now, any 5-tuples of consecutive positive integers would have a multiple of 2, a multiple of 3, a multiple of 4 and a multiple of 5. So, the product of any 5 -tuples would be a factor of 2 × 3 × 4 × 5 = 2 3 × 3 × 5 2×3×4×5 = 2^3 × 3 × 5 . So, the set of all honest positive integers is simply those 5-tuples which do not contain a multiple of 7 in it. Such 5-tuples 2 in every 7 of the consecutive sets that can be formed. So, the honest sets are those which start with 1, 2, 8, 9, 15, 16 and so on. There are 28 28 such sets. And the total 5-tuples of consecutive no. each less than 100 which can be formed is 95. So, probability required = 28 95 \dfrac{28}{95} . So, a + b = 123 a + b = \boxed{123} .

Firstly,we note that the product of any 5 consecutive positive integers is always divisible by 8,3 and 5.Hence, for the product of any 5 consecutive integers to be not divisible by 840, none of the 5 numbers should be divisible by 7 (as 840=3×5×7×8).This is possible only if we have the first number, say x, (when the 5 consecutive integers are arranged in increasing order) satisfying the condition : x=1(mod 7) or x=2(mod 7).Keeping in mind that x is atmost 95 , the total solutions of x=1(mod 7) are {1,8,15,......,92} and that of x=2(mod 7) are {2,9,16,.......93}. Hence, total number of possible values of x are 28 values.Hence, favourable outcomes are 28.And, all possible values of x are {1,2,3,.....95} that are 95 total outcomes.Hence, the required probability is favourable number of outcomes divided by total number of outcomes = 28/95. So, our answer is 28+95=123.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...