Hello, > On 29 August 2014 11:32, Simon King <[email protected]> wrote: > > On 2014-08-29, John Cremona <[email protected]> wrote: > > 1 is definitely not a prime power. > > OEIS says it is: http://oeis.org/A000961 > > ... and the very first comment there says "Since 1 = p^0 does not have > a well defined prime base p, it is sometimes not regarded as a prime > power."
Indeed, the reason you want to know if n is a prime power is usually that you want to do something with the unique p and k such that n = p^k. In that respect the PARI function isprimepower() is much more useful than the Sage one, since it returns p and k, not just true or false. The PARI function will be made accessible from Sage in #16878. Peter -- You received this message because you are subscribed to the Google Groups "sage-nt" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. Visit this group at http://groups.google.com/group/sage-nt. For more options, visit https://groups.google.com/d/optout.
