I believe all multiples of 28 should work. (Listing the first few operations)

1 Like

We might need some additional detail for any readers who might be less gifted. (me.)

1 Like

i claim that @AwesomeLife_Math 's claim is true.
first, looking downwards from above at the table, let the top child be A (WLOG), and label the others B,C,…,F going clockwise (again WLOG, the direction doesn’t make a difference to the argument).
consider this sequence of steps:

A performs 4m (m\in\mathbb{N}) moves :arrow_down:

each of F, D, B perform m moves respectively :arrow_down:

finally A performs 3m moves :arrow_down:

notice that all except A have 3m sweets. so this initial arrangement is perfect if n-25m=3m\iff n=28m. so clearly n being any multiple of 28 leads to a perfect arrangement.

now we must see if only these work (ie. the converse, so perfect arrangement \implies 28\ |\ n).
assume to the contrary that n=28m+k leads to a perfect arrangement, where 0<k<28 (so that 28\not| \ n).
further, let the number of moves each child X plays be denoted by their corresponding lowercase letter x, meaning A plays a moves, B plays b,… F plays f.
each time a move is played by anyone, a sweet is eaten.
\implies a+b+c+d+e+f=28m+k-6x, letting x denote the number of sweets each child has at the end.
also, we can find expressions for number of sweets each child has at the end.
for example, for A:

  • performs a moves, losing 4a sweets due to this.
  • gains a sweet for each move that B,D,F play.
  • has 28m+k sweets initially.

\iff b+d+f-4a+28m+k=x (A)
repeating this for each child gives:

  • (B):a+c+e-4b=x
  • (C ):b+d+f-4c=x
  • (D): a+c+e-4d=x
  • (E): b+d+f-4e=x
  • (F): a+c+e-4f=x

(B)=(D)=(F)\iff b=d=f
(C )=(E)\iff c=e
(A)=(C )\iff 28m+k=4(a-c)\iff 4(a-c-7m)=k
so 4 \ | \ k and k=4l for 0<l<7.
from (A) we now know 3b-4a+28m+4l=x and from (A)=(C ) that c=a-(7m+l).
we also know from before that

\begin{align} a+b+c+d+e+f&=28m+k-6x \\\iff a+2c+3b &= 28m + 4l-6(3b-4a+28m+4l) \\\iff a+2(a-(7m+l))+3b &= -20(7m+l) +6(4a-3b) \\\iff a+b+6(7m+l)&=2(4a-3b) \\\iff 6(7m+l)&=7(a-b) \\\iff 6l=7(a-b-6m) \end{align}

this means that, as \gcd(6,7)=1, 7 \ | \ l. however there is no integer that satisfies this for the required 0<l<7, leading to a contradiction.

therefore due to 4 \ | \ k and 7 \ | \ l, we know 28 \ | \ k. this means n=28m+k=28(m+w) for some positive integer w. both m and w are arbitrary, so we now have that arrangement is perfect \iff n is a multiple of 28.