MathDB
Painting positive integers

Source: Mexican Mathematical Olympiad 2016-Problem 2

November 7, 2016

Problem Statement

A pair of positive integers m,nm, n is called guerrera, if there exists positive integers a,b,c,da, b, c, d such that m=abm=ab, n=cdn=cd and a+b=c+da+b=c+d. For example the pair 8,98, 9 is guerrera cause 8=428= 4 \cdot 2, 9=339= 3 \cdot 3 and 4+2=3+34+2=3+3. We paint the positive integers if the following order:
We start painting the numbers 33 and 55. If a positive integer xx is not painted and a positive yy is painted such that the pair x,yx, y is guerrera, we paint xx.
Find all positive integers xx that can be painted.