Exploratory code for prime factorisation