Fix digital root method when digital root is 9
Fix perfect square predicate
Add triangular predicate