Problem

Source: Dutch BxMO TST 2016 p1

Tags: number theory, divisor, odd, equation



For a positive integer $n$ that is not a power of two, we define $t(n)$ as the greatest odd divisor of $n$ and $r(n)$ as the smallest positive odd divisor of $n$ unequal to $1$. Determine all positive integers $n$ that are not a power of two and for which we have $n = 3t(n) + 5r(n)$.