Help! For me this is surprising!

Jaap

-------------------


sage: a = sloane.A001694; a
Powerful Numbers (also called squarefull, square-full or 2-full numbers).
sage: a.offset
1
sage: a(1)
1
sage: a(200)
11552
sage: a.list(12)
[1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72]
sage: a(0)
Traceback (most recent call last):
...
ValueError: input n (=0) must be a positive integer
sage: seq = sloane_sequence(1694)
sage: print seq[1]
sage: seq[2][:12]
Searching Sloane's online database...
Powerful numbers, definition (1): if a prime p divides n then p^2 must also 
divide n (also called squarefull, square-full or 2-full numbers).
[1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72]
sage: a(950)

Exception (click to the left for traceback):
...
RuntimeError: maximum recursion depth exceeded in cmp

Traceback (most recent call last):
  File "", line 1, in
  File 
"/home/jaap/work/downloads/sage-1.6/sage_notebook/worksheets/_scratch_/code/8.py",
 line 4, in
    a(Integer(950))
  File "/home/jaap/work/downloads/sage-1.6/", line 1, in

  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 117, in __call__
    return self._eval(m)
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 505, in _eval
    return self._eval(n)
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 505, in _eval
    return self._eval(n)

  [... snipped tons of the same line]

  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 505, in _eval
    return self._eval(n)
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 505, in _eval
    return self._eval(n)
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 503, in _eval
    self._precompute()
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 496, in _precompute
    self._b += [i for i in range(self._n, self._n+how_many) if 
self.is_powerful(i)]
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/combinat/sloane_functions.py",
 line 543, in is_powerful
    for p in arith.prime_divisors(n):
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/rings/arith.py",
 line 1471, in prime_divisors
    v = [p for p,_ in factor(n) if p != -1]
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/rings/arith.py",
 line 1441, in factor
    int_=int_, debug_level=verbose), unit)
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/rings/arith.py",
 line 1361, in __factor_using_pari
    v = [(Z(B[i]),Z(e[i])) for i in xrange(len(B))]
  File 
"/home/jaap/downloads/sage-1.6/local/lib/python2.5/site-packages/sage/rings/integer_ring.py",
 line 170, in __call__
    return sage.rings.integer.Integer(x, base)
  File "integer.pyx", line 269, in integer.Integer.__init__
RuntimeError: maximum recursion depth exceeded in cmp


full_output.txt

But in smaller steps there are no problems in calculating 1000 or more values.

sage: a(250)
17672
sage: a(450)
54289
sage: a(650)
109561
sage: a(850)
184900
sage: a(950)
229441
sage: a(1050)
277729

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to