Finding integer solutions to this equation

$p^{\; \left\lfloor \sqrt{p} \right\rfloor}\; -\; q^{\; \left\lfloor \sqrt{q} \right\rfloor}\; =\; 999$

How do you find positive integer solutions to this equation?

-

The exponents must be less than $4$ (we have $17^4-16^4=17985$ and $16^4-15^3=62161$). There is an easy solution with $q=1$. The other solution arises from a difference of two cubes equal to $999$. In fact, $37=4^3-3^3$ is the difference of two consecutive cubes, and $999=3^3\cdot 37$. This gives $$12^3-9^3=999.$$

For the numbers equal to the difference of consecutive cubes see the sequence A003215 in integer sequences, which is the crystal ball sequence for a hexagonal lattice.

-
Actually $17^4-16^4$ is less than 62161. –  Henning Makholm Nov 18 '13 at 12:55
How did you combine $37\;=\;4^{3}-3^{3}$ and $999\;=\;3^{3}\; \cdot \; 37$ to arrive at $12^{3}\;-\;9^{3}\;=\;999$? –  user2612743 Nov 19 '13 at 1:23
Multiplication by $3^3$, i.e. $4^3\cdot 3^3=12^3$ etc. –  Dietrich Burde Nov 19 '13 at 8:46

Calculate $x^{\lfloor x^{1/2}\rfloor}$ for the first dozen or so integers. Soon the function starts to increase so quickly that there's no hope of getting 999 as the difference between its values. Check whether any of the values you get until that happens happen to be an earlier value plus 999.

(There are two solutions).

-