Fixed My mistake in calculating Pei[] and a typo in the definition of p_0.