A bag contains (2n+1) coins. It is known that n coins have two heads and the rest are fair, if p(head)=31/42, find the number of coins in the bag? I knw this question has been asked here
however, I solved it by myself, mostly using my intuition, and I want help in making it more rigorous
if we pick up one of the double-headed coins we get
$\frac{n}{2n+1}$
and if it's fair
$\frac{1(n+1)}{2(2n+1)}$
by the total probability theorem
we get
$\frac{n}{2n+1}+\frac{1(n+1)}{2(2n+1)}=\frac{31}{42}$
thus n=10
how to formulate this more rigouously
 A: First of all, the question in the posted title is different, and is in fact impossible to solve.
For example: assume that
$$\frac{32}{42} = \frac{n}{2n+1} + \left(\frac{n+1}{2n+1} \times \frac{1}{2}\right) \implies $$
$$\frac{32}{42} = \frac{2n}{4n + 2} + \frac{n+1}{4n + 2} = \frac{3n + 1}{4n + 2}. \tag1 $$
In general, an equation of form
$$\frac{a}{b} = \frac{c}{d}$$
may be solved by converting it to the equation
$$(a \times d) = (b \times c).$$
So, (1) above is converted into
$$32 \times (4n + 2) = 42 \times (3n + 1) \implies  \tag2 $$
$$128n + 64 = 126 n + 42 \implies 2n + 22 = 0 \implies n = -11. \tag3 $$
The conclusion in (3) is clearly impossible, because $n$ must be positive.  Therefore, the original fraction of $~\dfrac{32}{42}~$ permits no solution.

If the fraction is changed to $~\dfrac{31}{42}~$, then the converted equation is changed from that expressed in (2) above to
$$31 \times (4n + 2) = 42 \times (3n + 1) \implies  $$
$$124n + 62 = 126 n + 42 \implies -2n + 20 = 0 \implies n = 10. $$
