# HG changeset patch
# User Robert Bradshaw <robertwb@math.washington.edu>
# Date 1192909205 25200
# Node ID e8a549c75fd221c8e51b86c95ecf4d698488ffeb
# Parent e595259bce6837e80860057e5a7f38a2b3aea129
Fix Ticket #922, bug in prime_powers
diff r e595259bce68 r e8a549c75fd2 sage/rings/arith.py
a

b

def prime_powers(start, stop=None): 
513  513  True 
514  514  """ 
515  515  if stop is None: 
516   start, stop = 1, int(start) 
 516  start, stop = 1, integer.Integer(start) 
517  517  from math import log 
518  518  from bisect import bisect 
519  519  v = prime_range(stop) 
… 
… 
def prime_powers(start, stop=None): 
525  525  else: 
526  526  w = list(v) 
527  527  if start <= 1: 
528   w.insert(0, 1) 
 528  w.insert(0, integer.Integer(1)) 
529  529  log_stop = log(stop) 
530  530  for p in v: 
531  531  q = p*p 