Source: http://prepacom.net/archive/math/exercices/correction/denombrement/correction.pdf