On Mon, Jan 5, 2009 at 11:54 AM, mabshoff
<michael.absh...@mathematik.uni-dortmund.de> wrote:
>
>
>
> On Jan 3, 5:58 pm, "Jason Martin" <jason.worth.mar...@gmail.com>
> wrote:
>> Excellent!!  Thanks for the error checking Michael!!
>>
>> Jason Worth Martin
>> Asst. Professor of Mathematicshttp://www.math.jmu.edu/~martin
>
> Ok, I have now verified that for all a up to 10**10 "(-
> a^3).is_perfect_power()" returns true. Now obviously I should
> implement my own version of some algorithm to check that a is a
> perfect power and compare the cases where b up to some bound isn't.
> But I doubt I will get to that any time soon.

Just make a list of all perfect powers up to some bound. E.g.,
this snippet of codes makes a list of all nontrivial perfect powers in
[-10^10..10^10]:

v = [-1,0,1]
for n in [-10^5..-2] + [2..10^5]:
    k = 2
    while True:
        a = n^k
        if abs(a) > 10^10: break
        v.append(a)
        k += 1
v = list(sorted(list(set(v))))

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to