Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes:
> Ah, the penny drops! Are you using Python 2.7 with old-style division? That
> would explain it.

Yes, see also the use of the print statement in that post.  I'm
surprised the code compiled at all in Python 3.

> Nice! Except that your fac() function has a bug: it includes 1 as a prime
> factor for some values, which is strictly incorrect.

Good catch, I noticed that too after posting.  

This might be of interest:

http://wrap.warwick.ac.uk/54707/1/WRAP_Hart_S1446788712000146a.pdf

I haven't tried figuring it out or coding it yet.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to