A stack is considered valid if it meets the conditions. Let an be the number of valid stacks with n disks (with radii 1,2,…,n). We prove by induction that an=(n+1)!. For n=1, we can make two stacks: one with the transparent disk of radius 1 and one with the opaque disk of radius 1, so a1=2=2!. Suppose now that for some n≥1 we have proven that an=(n+1)!. Consider a valid stack with n+1 disks. If we remove the disk with radius n+1, all remaining disks are still visible from above, so we are left with a valid stack of n disks. Every valid stack with n+1 disks can thus be created by inserting the disk with radius n+1 into a valid stack of n disks at a suitable position. In principle, there are n+1 positions where we can insert the disk with radius n+1: above the top disk, above the second disk, ..., above the bottom disk, and also below the bottom disk. The disk with radius n+1 is always visible, regardless of where we insert it. If we insert the disk with radius n+1 below the bottom disk, it can be either transparent or opaque; in both cases, the view of the other disks is not blocked. Thus, there are 2an valid stacks where the disk with radius n+1 is at the bottom. However, if we insert an opaque disk with radius n+1 at any other position, it blocks the view of the disks below it. Therefore, we can only insert the transparent disk with radius n+1 at the other n positions. Thus, there are nan valid stacks where the disk with radius n+1 is not at the bottom. We find
an+1=2an+nan=(n+2)an=(n+2)(n+1)!=(n+2)!
This completes the induction.