MathDB
3 bodybuilders fighting against a n-headed monster

Source: 2020 1st OMpD L3 P2 - Brazil - Olimpíada Matemáticos por Diversão

July 8, 2023
combinatoricsnumber theory

Problem Statement

Metadieu, Tercieu and Quartieu are three bodybuilder warriors who fight against an nn-headed monster. Each of them can attack the monster according to the following rules:
(1) Metadieu's attack consists of cutting off half of the monster's heads, then cutting off one more head. If the monster's number of heads is odd, Metadieu cannot attack;
(2) Tercieu's attack consists of cutting off a third of the monster's heads, then cutting off two more heads. If the monster's number of heads is not a multiple of 3, Tercieu cannot attack;
(3) Quartieu's attack consists of cutting off a quarter of the monster's heads, then cutting off three more heads. If the monster's number of heads is not a multiple of 4, Quartieu cannot attack;
If none of the three warriors can attack the monster at some point, then it will devour our three heroes. The objective of the three warriors is to defeat the monster, and for that they need to cut off all its heads, one warrior attacking at a time.
For what positive integer values of nn is it possible for the three warriors to combine a sequence of attacks in order to defeat the monster?