Let \(p(x)\) be defined on \(2 \le x \le 10\) such that where
\(p(x) = \begin{cases} x + 1 &\quad \lfloor x \rfloor\text{ is prime} \\ p(y) + (x + 1 - \lfloor x \rfloor) &\quad \text{otherwise} \end{cases}\)
is the greatest prime factor of \(\lfloor x\rfloor\) Express the range of \(p\) in interval notation.
I've tried to do this problem and I think it's [3,10) but i'm not sure... can someone comfirm this maybe?