speed up n_sqrtmod for small p using brute force search