Numbers of the form $a^m-b^n$

Can all positive integers $k$, be written as a difference of two perfect powers $k=a^m-b^n$, with $m,n>1$ and $a,b$ positive integers?

A number is imperfect if it can not, which numbers are imperfect?

What is the asymptotics of the number of imperfect numbers less then $x$, as $x\rightarrow\infty$?

I have proved that all odd numbers are the difference of two squares. How to solve the other cases?

• A number is the difference of two squares if and only if it is odd or divisible by 4. – N. S. Jun 3 '12 at 19:45
• So we are left with k=2*odd, and m or n above 2 – Sigma4 Jun 3 '12 at 19:55
• The terminology "perfect number" already has a standard meaning in number theory - you should probably choose a different word. – Greg Martin Jun 3 '12 at 20:22
• One exception: $4$ is not the difference of two positive squares. It is, however, $2^3-2^2$. To supplement NS's comment: $$\begin{array}{c} (k+1)^2-(k-1)^2=4k; \\ (k+1)^2-k^2=2k+1. \end{array}$$ This covers integers congruent to $0$ or $\pm1$ modulo $4$. – anon Jun 3 '12 at 21:10