MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Writing prime factor decomposision in conventional form


In article <e05ri1$3ru$1 at smc.vnet.net>,
 "Dr. Wolfgang Hintze" <weh at snafu.de> wrote:

> How can I get a conventional form output for the prime number 
> decomposition, e.g. {{2,3},{5,1}} as 2^3 5 ?
> 
> I have found some (rather cumbersome) method but it leaves the final 
> expression in "" when I put it into input format in order to transfer it 
> in simple text form to another application.
> 
> I'm sure that there is a simple way to achieve the goal.
> 
> Any idea is greatly appreciated.

This is a FAQ, as you will see if you do a search on 

  FactorInteger format

at http://groups.google.com/group/comp.soft-sys.math.mathematica. The 
main idea is to use HoldForm and ReleaseHold. Here is one solution:

 FactorInteger[238500]

 Times @@ Apply[Power, Map[HoldForm, %, {2}], {1}]

 ReleaseHold[%]

Cheers,
Paul

_______________________________________________________________________
Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Re: Listing the partitions of a set
  • Next by Date: Re: Problem with Infinite products
  • Previous by thread: Re: Writing prime factor decomposision in conventional form
  • Next by thread: Re: Writing prime factor decomposision in conventional form