multiplicity function edited , now returns inifinity when n equals 0, and also returns infinty when p equals 2 and n equals zero, which previously was returning zero 

for issues #8159 and #8145
@smichr this is done only when p >= 2, because for all other values of p < 2, a value error is raised. So, if infinity were to be returned then this would only be, when the input p is valid and n equals zero.