A bit of number theory with SymPy