Three distinct numbers are selected randomly from the set {1,2,3,…,40}. If the probability, that the selected numbers are in an increasing G.P., is nm,gcd(m,n)=1, then m+n is equal to \_\_\_\_\_\_\_\_\_\_ .
Answer: 2477
Solutions · 1
Official solution
Total number of ways of selecting 3 distinct numbers from 1,2,…,40 is
(340)=640⋅39⋅38=9880.
Now, three numbers in increasing G.P. can be written as
a,ar,ar2(r>1).
Let r=qp in lowest form, where p>q and gcd(p,q)=1.
Then
a,aqp,aq2p2
must all be integers. So a must be a multiple of q2. Write
a=kq2(k∈N).
Then the triple becomes
kq2,kpq,kp2,
which is strictly increasing since p>q.
Also all must be ≤40. Since
q2itisenoughtoensurek{p}\^{2}\le 40\, \Rightarrow \, k\le \lfloor \frac{40}{{p}\^{2}}\rfloor .Soforeachcoprimepair(p,q)withp>q,thenumberofvalidtriplesequals\lfloor \frac{40}{{p}\^{2}}\rfloor .Now{p}\^{2}\le 40\Rightarrow p\le 6.Countforeachp:p=2:q=1(1value),\lfloor \frac{40}{4}\rfloor =10\Rightarrow 10p=3:q=1,2(2values),\lfloor \frac{40}{9}\rfloor =4\Rightarrow 2\cdot 4=8p=4:q=1,3(2values),\lfloor \frac{40}{16}\rfloor =2\Rightarrow 2\cdot 2=4p=5:q=1,2,3,4(4values),\lfloor \frac{40}{25}\rfloor =1\Rightarrow 4\cdot 1=4p=6:q=1,5(2values),\lfloor \frac{40}{36}\rfloor =1\Rightarrow 2\cdot 1=2Hencenumberoffavourabletriples:10+8+4+4+2=28.Thereforerequiredprobabilityis\frac{28}{9880}=\frac{7}{2470}\, (gcd(7,2470)=1).So