Welcome back! These hints are great
First stab at part one (using gmpy2 for fast bignums)
from gmpy2 import mpz, isqrt_rem, t_div, gcddef one(c): # Determine if a square if t_div(c, 4) 2: # Make it square? c = t_div(c, 2) # Find the square root d and remainder e d, e = isqrt_rem(c) # First decision, if e is 0, return d if e 0: return d # Second decision, if(GCD(e,d)!=1) return GCD(e,d) tmp = gcd(e, d) if tmp != 1: return tmp return None