Solution 1
Suppose that the bag contains g gold balls.
We assume that Feridun reaches into the bag and removes the two balls one after the other.
There are 40 possible balls that he could remove first and then 39 balls that he could remove second. In total, there are 40(39) pairs of balls that he could choose in this way.
If he removes 2 gold balls, then there are g possible balls that he could remove first and then g−1 balls that he could remove second. In total, there are g(g−1) pairs of gold balls that he could remove.
We are told that the probability of removing 2 gold balls is 125.
Since there are 40(39) total pairs of balls that can be chosen and g(g−1) pairs of gold balls that can be chosen in this way, then 40(39)g(g−1)=125 which is equivalent to g(g−1)=125(40)(39)=650.
Therefore, g2−g−650=0 or (g−26)(g+25)=0, and so g=26 or g=−25.
Since g>0, then g=26, so there are 26 gold balls in the bag.
Solution 2
Suppose that the bag contains g gold balls.
We assume that Feridun reaches into the bag and removes the two balls together.
Since there are 40 balls in the bag, there are (240) pairs of balls that he could choose in this way.
Since there are g gold balls in the bag, then there are (2g) pairs of gold balls that he could choose in this way.
We are told that the probability of removing 2 gold balls is 125.
Since there are (240) pairs in total that can be chosen and (2g) pairs of gold balls that can be chosen in this way, then (240)(2g)=125 which is equivalent to (2g)=125(240).
Since (2n)=2n(n−1), then this equation is equivalent to 2g(g−1)=125240(39)=325.
Therefore, g(g−1)=650 or g2−g−650=0 or (g−26)(g+25)=0, and so g=26 or g=−25.
Since g>0, then g=26, so there are 26 gold balls in the bag.
Suppose that the first term in the geometric sequence is t1=a and the common ratio in the sequence is r.
Then the sequence, which has n terms, is a,ar,ar2,ar3,…,arn−1.
In general, the kth term is tk=ark−1; in particular, the nth term is tn=arn−1.
Since t1tn=3, then a⋅arn−1=3 or a2rn−1=3.
Since t1t2⋯tn−1tn=59049, then (a)(ar) (ar n-2 )(ar n-1 ) = 59 ,049 a n r r 2 r n-2 r n-1 = 59 ,049 (since there are n factors of a on the left side) a n r 1+2+ +(n-2)+(n-1) = 59 ,049 a n r 1 2 (n-1)(n) = 59 ,049 since 1+2+⋯+(n−2)+(n−1)=21(n−1)(n).
Since a2rn−1=3, then (a2rn−1)n=3n or a2nr(n−1)(n)=3n.
Since anr21(n−1)(n)=59049, then (anr21(n−1)(n))2=590492 or a2nr(n−1)(n)=590492.
Since the left sides of these equations are the same, then 3n=590492.
Now 59049=3(19683)=32(6561)=33(2187)=34(729)=35(243)=36(81)=3634=310 Since 59049=310, then 590492=320 and so 3n=320, which gives n=20.