Problem 12. Birthday Cake

Uncle Taghi is going to throw a party and give each guest an equal portion of the cake. However, he forgot whether there are 9 guests or 15 guests at his party. The cake should be cut into some pieces in a way that Taghi can equally distribute them between the guests regardless of their number (9 or 15). Notice that the cake is cut before the party starts and the pieces may or may not be of the same size. Taghi may give one or more pieces to each guest. What is the smallest number of cuts necessary to divide the cake?
Link to the problem on Twitter: https://twitter.com/Riazi_Cafe/status/1677561303894982657
. The correct answer is 21.
Let us assume that the total size of the cake is 1. The cake can be cut into the following pieces:
9 pieces of size \(1/15\).
6 pieces of size \(2/45\).
6 pieces of size \(1/45\).
If 15 guests show up to the party, Taghi can give 9 guests pieces of size 1/15 and give 6 guests two pieces of sizes \(1/45\) and \(2/45\).
If 9 guests show up to the party, Taghi can give 6 guests two pieces of sizes \(1/15\) and \(2/45\) and give 3 guests three pieces of sizes \(1/15\), \(1/45\), and \(1/45\).