Obtaining the confounding pattern for 2k-p experiments