ON THE GENERATION OF P-SEQUENCES