id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
13516 prime_powers doesn't work with start very well kcrisman was "See [https://groups.google.com/forum/?fromgroups=#!topic/sage-support/lW_a7ZE3Zf8 this sage-support thread].
{{{
In Sage 5.3, the function prime_powers behaves a little strange:
sage: prime_powers(4,10)
[4, 5, 7, 8, 9]
# As expected
sage: prime_powers(5,10)
[7, 8, 9]
# 5 isn't a prime power anymore???
# And now things become even worse:
sage: prime_powers(7,10)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
/home/mueller/ in ()
/home/mueller/local/sage-5.3/local/lib/python2.7/site-packages/sage/rings/arith.pyc in prime_powers(start, stop)
743 i = bisect(v, start)
744 if start > 2:
--> 745 if v[i] == start:
746 i -= 1
747 w = list(v[i:])
IndexError: list index out of range
}}}
Yeah, this seems problematic. The code in question is ''old'', too, so perhaps there is a more efficient way to do it in the meantime...
'''Apply''' to `devel/sage`: [attachment:13516_primepowers.2.patch]." defect closed major sage-5.6 number theory fixed beginner was sage-5.6.beta1 Kevin Halasz Dmitrii Pasechnik, Punarbasu Purkayastha, Karl-Dieter Crisman N/A