A commutative ring is local if it has a single maximal ideal. If the ring is finite, this implies that all elements are either units or nilpotents. Further, all finite local rings have prime power order.

Given a prime power $p^k$ and a positive integer $n < p^k$, under what conditions on $p, k, n$ does there exist a local ring $R$ with $|R| = p^k$ and $n$ nilpotents?