Re: Determining if n is of the form m^k?



Raymond Toy wrote:
>>>>>>"van.Nek" == van Nek <van.Nek at gmx.net> writes:
> 
> 
>     van.Nek> Hello Ray, factoring isn't as hard as you might
>     van.Nek> think. There is a new implementation of integer factoring
>     van.Nek> in cvs now.  In src/ifactor.lisp you will find a function
>     van.Nek> `get-factor-list', which could possibly fit your
>     van.Nek> needs. Give it a try.  Remark: there will be version 1.3
>     van.Nek> of ifactor.lisp in a couple of days. Some things will
>     van.Nek> change a little bit, but `get-factor-list' will remain
>     van.Nek> unchanged.  Volker
> 
> [snip]
> 
>     van.Nek> (%i5) :lisp(get-factor-list 123456789)
>     van.Nek> ((3803 1) (3607 1) (3 2))
> 
>     van.Nek> (%i5) :lisp(get-factor-list 1024)
>     van.Nek> ((2 10))
> 
> Neat.
> 
> What do people think?  Should maxima try harder to simplify things
> like 6*2^k to 3*2^(k+1)?
> 
> Ray

Yes. Though maybe it could be called only from functions like ratsimp?

Joal Heagney