You have a solution in every interval $[k, k+1), k \in \mathbb N$ which contains a power of $e.$
To prove this, consider breaking up $[k, k+1)$ as $[k, e^\alpha) \cup[e^\alpha, k+1).$
In the first interval, $\lfloor{\ln x}\rfloor = \alpha -1, $ while $\ln\lfloor{ x}\rfloor = \ln k$.
It is easy enough to see that the inequality doesn't hold in this region (Using the fact that $k > e^{\alpha - 1}$)
For the second interval, $\lfloor{\ln x}\rfloor = \alpha, $ while $\ln\lfloor{ x}\rfloor = \ln k$.
Obviously, $\alpha > \ln k$ so the inequality holds.
Hence, your solution set is of the form: $[e^\alpha, \lceil{e^\alpha}\rceil) \quad\forall \alpha \in \mathbb N$
As the spiral is winding around, we have four $90°$ turns before completing a full rotation. Notice that each rotation starts and ends with an odd square.
This is because, starting at $r^2-1$ and adding the four sides $4(r+1)$ to complete a rotation, gives $r^2+4r+3=(r+2)^2-1$, reaching the next odd square.
Therefore, odd squares $n=(2k+1)^2$ are mapped to $(y,x)=(-k, k+1)$.
Hence, given $n$ we start by computing $k=\frac12(\sqrt{n}-1)$ to determine in which rotation the given number is located in. That is, it is located between two odd squares $(2\lfloor k\rfloor+1)^2$ and $(2\lceil k\rceil+1)^2$ that determine the start and end of the rotation.
Now we simply backtrack from the end to the start of the rotation.
Given $n$, end of rotation is at $(-K, K+1)$, where $K=\left\lceil\frac12(\sqrt{n}-1)\right\rceil$.
Given $n$, distance from the end of the rotation is $d=(2K+1)^2 - n$.
This gives $U(n)=(y,x)$ as:
$$
U(n)=
\begin{cases}
(-K&,+K+1-d&), & 0K+0\le d\le 2K+1\\
(-3K-1+d&,-K&), & 2K+1\lt d\le 4K+1\\
(+K&,-5K-1+d&), & 4K+1\lt d\le 6K+1\\
(+7K+1-d&,+K&), & 6K+1\lt d\lt 8K+1\\
\end{cases}
$$
which is as simple as it gets.
Verifying the formula in python, gives the expected result as in the picture:
36 35 34 33 32 31 30
37 16 15 14 13 12 29
38 17 4 3 2 11 28
39 18 5 0 1 10 27
40 19 6 7 8 9 26
41 20 21 22 23 24 25
42 43 44 45 46 47 48 49
Best Answer
If $\lfloor x \rfloor \in \mathbb{P}$, then $$ p(x) = x + 1 $$ So we cover the interval $[\lfloor x \rfloor + 1, \lfloor x \rfloor + 2)$
If $\lfloor x \rfloor \not\in \mathbb{P}$, then $$ p(x) = p(y) + \{x\} + 1 = y + 2 + \{x\}$$ So we cover the interval $[y+2, y+3)$
The prime values of $\lfloor x \rfloor$ we take on in the domain are 2, 3, 5, 7. So we cover the intervals [3, 4), [4, 5), [6, 7), [8, 9)
The non-prime values of $\lfloor x \rfloor$ are 4, 6, 8, 9 - they're largest prime factors are 2 and 3 So this lets us cover [4, 5) and [5, 6)
The union of all these intervals is [3, 7) union [8, 9)
We also have to consider the special case of $x = 10$, where p(10) = 6 + 1 = 7, which makes [3, 7) closed.
Therefore the range of p is $[3,7] \bigcup [8, 9)$