Let X be a set such that , where n is a positive integer. Call a functionflatif some iterate of it is constant.

For example, if denotes , and denotes , a function isflatif there exists a positive integer k such that is a constant function on X.

In terms of n, how many flat functions are there on X?