Problem

Source:

Tags: Recursive Sequences



A sequence with first two terms equal $1$ and $24$ respectively is defined by the following rule: each subsequent term is equal to the smallest positive integer which has not yet occurred in the sequence and is not coprime with the previous term. Prove that all positive integers occur in this sequence.