Find prime factorisation (#820)