The Problem
For which primes $p$ and positive integers $k$ is the deficiency $D(p^k)$ equal to the arithmetic derivative of $p^k$?
My Attempt
Let $\sigma(x)$ denote the sum of divisors of the positive integer $x$.
The deficiency of $x$ is given by the formula $$D(x)=2x-\sigma(x).$$
So, when $p$ is prime and $k$ is a positive integer, we get $$D(p^k)=2p^k-\sigma(p^k)=2p^k-\bigg(\frac{p^{k+1}-1}{p-1}\bigg)=\frac{p^{k+1} - 2p^k + 1}{p - 1}.$$
But the arithmetic derivative of $p^k$ is given by (the usual formula) $$kp^{k-1}.$$
Equating, we obtain $$kp^{k-1}=D(p^k)=\frac{p^{k+1} - 2p^k + 1}{p - 1}.$$
Suppose that $k=1$. Then we get $$\frac{p^2 - 2p + 1}{p - 1}=\frac{(p-1)^2}{p-1}=p-1=1 \implies p=2.$$
Now, assume that $k>1$. Then we have $$kp^k - kp^{k-1}=p^{k+1} - 2p^k + 1$$ from which follows that $$-p^{k+1} + (k+2)p^k - kp^{k-1} = 1.$$ But since $k>1$ and $p$ is prime, the $\text{LHS}$ of the last equation is divisible by $p^{k-1} > 1$. This contradicts the fact that $p^{k-1} > 1$ does not divide the $\text{RHS}$.
Hence, the only solution is $$(p,k)=(2,1).$$
Question
Is this solution/proof correct?
Everything you've done appears to be correct. In fact, the methods you used are basically the same ones I would have used if I were to answer it.