ignore the last 10 or so reverts etc. Script 21 optimised

Used the square root method of finding factors so it runs ~ 20 seconds
on pypy. Could further enhance it but at this stage it is technically
good enough.