Dividing a cake between $n-1$, $n$, or $n+1$ guests 
A housewife is waiting for guests and has prepared a cake. She doesn't know how many guests will come, but it will be $n-1$, $n$, or $n+1$. 
  What is the minimal number $f(n)$ of pieces the cake should be cut to make it possible to divide between guests equally?

For $n=2$, $f(n)=f(2)=4$:

The problem was posed 16.10.2018 by Oleksandr Maksymets on page 76 of Volume 2 of the Lviv Scottish Book.
The prize: Cooked duck or lunch + beer!
 A: $f(7)=15$. 
$f(7)\ge15$ follows from a comment of Fedor Petrov on the original question, so it suffices to find a way to cut the cake into $15$ pieces so as to serve $6$, $7$, or $8$ guests. 
Let the size of the cake be $168$ (so that all the following computations involve only whole numbers). Let the $15$ pieces be of sizes $1,2,4,5,7,8,10,11,13,14,16,17,19,20,21$ (that is, every size not a multiple of $3$ up to $20$, and $21$). Then 
$$1+20=2+19=4+17=5+16=7+14=8+13=10+11=21,$$
$$4+20=5+19=7+17=8+16=10+14=11+13=1+2+21(=24),$$
$$7+21=8+20=4+5+19=11+17=2+10+16=1+13+14(=28).$$
Note that this disproves my conjecture $f(n)=[5n/2]-1$ which evaluates to $16$ when $n=7$. 
A: $f(6) = 13$ with a cake of size $210$ and piece sizes:
$$\{3, 5, 8, 10, 12, 13, 17, 18, 20, 22, 25, 27, 30\},$$
where
$$17+25 = 5+10+27 = 20 + 22 = 3+8+13+18 = 12+30,$$
$$10+25 = 5+30 = 3+12+20 = 17+18 = 13 + 22 = 8+27,$$
$$5+25 = 3+27 = 10+20 = 12+18 = 13+17 = 30 = 8+22.$$
It was computed with via solving MILP as explained in my other answer.
A: Too long for a comment. Here is a way to use around $8n/3$ pieces.
Cut out as many pieces of length $1/(n+1)+1/n+1/(n-1)$ as you can; there are $k\approx n/3$ of them. Imagine each such piece as a segment; this segment can be cut into pieces $1/(n+1),1/n,1/(n-1)$ (in this order) and $1/(n-1),1/(n+1),1/n$ (in this order). Mark cutting points for both cuttings, and cut by all of them. Notice that pieces of the same desired length do not overlap within the segment.
Thus, after $5k$ cuttings you get $2k$ non-overlapping pieces of each type separately. To arrange other $n-1-2k$ pieces of length $1/(n-1)$, take away those $2k$ pieces of length $1/(n-1)$, form a single segment of the others, and cut it into desired pieces of length $1/(n-1)$ by $n-2-2k$ cuts. Similarly, we need $(n-1-2k)+(n-2k)$ additional cuts in order to get the other two distributions possible.
