At the Christmas market, a man was selling nuts in a market stall.
- The first person bought one nut, the next customer bought two nuts, the next bought four, and so on.
That is, every new customer acquired twice as many nuts as the previous one. Last customer of the day bought 50 kg of nuts, and after that the salesman had only one nut left. How much weighed all the nuts in the beginning of the day? (All nuts are the same.)
Well we can say that the number of nuts sold, $N$, is equal to $$N=\sum_{k=0}^{c}2^k$$ where $c$ is the number of customers. Then if the last customer bought $50$kg of nuts that means he bought $$N_f=\frac{50}{m}$$ nuts where $m$ is the mass of the nuts. That means that $$2^c=\frac{50}{m}$$ therefore $$c=\log_{2}\frac{50}{m}$$ So in total, the mass of all the nuts in the begging was $$m_i=m(\sum_{k=0}^{\log_{2}\frac{50}{m}}2^k+1)$$ This is good but we can take it a step further, we know that since $2^c=\frac{50}{m}$, that $\frac{50}{m}$ must only have prime factors of $2$. To do this since $50=2(5^2)$ we know $m$ must be of the form $$m=\frac{25}{2^j}$$ where $j$ is an integer. Therefore $$2^c=2*2^j$$ $$c=j+1$$ This means we can now say that $$m_i=\frac{25}{2^j}\left(\sum_{k=0}^{j+1}2^k+1\right)$$ Which simplifies down to $$m_i=\frac{25}{2^j}(2^{j+2}-1+1)$$ So we conclude $$m_i=100kg$$