Range of a picewise defined function

32 Views Asked by At

Let $p(x)$ be defined on $2 \le x \le 10$ such that$$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}$$where $y$ is the greatest prime factor of $\lfloor x\rfloor.$ Express the range of $p$ in interval notation.

So I put the answer as $[3,8]$ but it was wrong but I'm not sure why. Help!

enter image description here

1

There are 1 best solutions below

3
On

HINT: study the behaviour of $p([n,n+1[)$ as $n$ ranges in the set $\Bbb{N}\cap [2,9]$.

EDIT: Observe first that in the interval $[n,n+1[$ the floor function takes only the value $n$ and the function $x-\lfloor x \rfloor$, that is the fractional part of $x$, is a bijection with the interval $[0,1[$. Then you can proceed like this:

  • $n=2$ is prime. $p(2)=3$ and $p([2,2+1[)=[p(2),p(2)+1[=[3,4[$
  • $n=3$ is prime. $p(3)=4$ and $p([3,3+1[)=[p(3),p(3)+1[=[4,5[$
  • $n=4$ is not prime. Its biggest prime divisor is $2$. $p(4)=p(2)+1=4$ and $p([4,4+1[)=[p(4),p(4)+1[=[4,5[$
  • $\dots$