On the congruence $1^m + 2^m + \dotsb + m^m \equiv n \pmod{m}$ with $n | m$
We show that if the congruence above holds and $n\mid m$, then the quotient $Q:=m/n$ satisfies $\sum_{p\mid Q} \frac{Q}{p}+1 \equiv 0\pmod{Q}$, where $p$ is prime. The only known solutions of the latter congruence are $Q=1$ and the eight known primary pseudoperfect numbers $2,6,42, 1806, 47058, 2214502422, 52495396602,$ and $8490421583559688410706771261086$. Fixing $Q$, we prove that the set of positive integers $n$ satisfying the congruence in the title, with $m=Q n$, is empty in case $Q=52495396602$, and in the other eight cases has an asymptotic density between bounds in $(0,1)$ that we provide.