Pad every number with leading zeros to obtain exactly decimal digits. Its digits are a solution of in nonnegative integers. Conversely every such solution is a valid digit string, since no individual digit can exceed ; its digit sum also excludes the number zero. The stars and bars count therefore gives
For , , so . Thus , with an explicit Big O notation constant and threshold .
Let be the set of permutations fixing object . If a specified collection of objects is fixed, the remaining objects can be arranged in ways. There are such collections. Applying the inclusion-exclusion principle to exclude all fixed objects gives
For , the terms and cancel. Thus the number of derangements is , interpreting the remaining sum as empty when . The full inclusion-exclusion formula also gives .
Put . By distributivity, and . Consequently,
Here we used associativity, distributivity, and idempotence of set intersection and set union. The equality holds for every , so : is an idempotent function.

There are unlisted articles, also show them or only show them.