You can solve it by recusive definition: suppose

Let be the number of onto function from a set with n elements to a set with three elements, be the number of onto function from a set with n elements to a set with two elements.

then what is the recusive relation between , and ?

while it is easy to see that .