Problem

Source: Benelux Mathematical Olympiad 2011, Problem 3

Tags: geometry, 3D geometry, modular arithmetic, inequalities, algebra proposed, algebra



If $k$ is an integer, let $\mathrm{c}(k)$ denote the largest cube that is less than or equal to $k$. Find all positive integers $p$ for which the following sequence is bounded: $a_0 = p$ and $a_{n+1} = 3a_n-2\mathrm{c}(a_n)$ for $n \geqslant 0$.