Changed the primegen into a composite/prime generator, then generated a list of doubled squares too. Then just looped through both until the number is found. Is actually quicker than I expected it to be, because it is very brute forcey.
Changed the primegen into a composite/prime generator, then generated a list of doubled squares too. Then just looped through both until the number is found. Is actually quicker than I expected it to be, because it is very brute forcey.

jamtot/PyProjectEuler,jamtot/PyProjectEuler