Actually, I am trying to get rid of this function. This is the function I implemented( with the kind help from community) to find continued function representation of an quadratic irrationality. But to solve Pell's equation lot more information is needed other than numbers in continued fraction representation. Those are given by `PQa()`.
But it doesn't give the length of the periodic part and couldn't find a way to modify it to give the length as I implemented it as a generator function. It would be nice if someone could propose an alternative or modification to `PQa()` to find the lengths of periodic part and aperiodic part. But for the time being, I'll add doctests and regular tests.