Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Writing prime factor decomposision in conventional form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65326] Re: [mg65320] Writing prime factor decomposision in conventional form
  • From: "Carl K. Woll" <carlw at wolfram.com>
  • Date: Mon, 27 Mar 2006 06:55:51 -0500 (EST)
  • References: <200603261044.FAA03868@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Dr. Wolfgang Hintze 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.
> 
> Regards,
> Wolfgang

A couple of methods that might help:

Times @@ Superscript @@@ FactorInteger[40]

or

Times @@ (HoldForm[Power[##]]&) @@@ FactorInteger[40]

Unfortunately, straightforward conversion of the output of these methods 
into InputForm will probably not produce the simple text form you are 
looking for. What is the simple text form of these outputs that you desire?

Carl Woll
Wolfram Research


  • Prev by Date: Re: Writing prime factor decomposision in conventional form
  • Next by Date: Re: Writing prime factor decomposision in conventional form
  • Previous by thread: Re: Writing prime factor decomposision in conventional form
  • Next by thread: Re: Writing prime factor decomposision in conventional form