Integer Factorisation, Fermat & Machine Learning on a Classical Computer