Problem

Source: Saudi Arabia BMO TST Day I Problem 1

Tags: function, number theory, prime numbers, number theory unsolved



A positive proper divisor is a positive divisor of a number, excluding itself. For positive integers $n \ge 2$, let $f(n)$ denote the number that is one more than the largest proper divisor of $n$. Determine all positive integers $n$ such that $f(f(n)) = 2$.