Proof.
This is another application of the Inclusion-Exclusion principle. Consider
the set of functions from

to

with

and

. For any

, define

to be the set of functions
avoiding

.
So the set of surjections is

.
Thus the number of surjections from

to

is

. By the inclusion-exclusion
principle this is

.
If

then

. The result follows.