MathGroup Archive 1998

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

Search the Archive

Re: FactorInteger


In a message dated 10/18/98 4:38:43 PM, awhopper at hermes.net.au wrote:

>Concerning the Prime Factors of composite integers ;
>
>e.g;
>
>In[1] := 2^4 3^3 4^2
>
>Out[2] = 6912
>
>In[3] := FactorInteger[%]
>
>Out[4] = {{2,4},{3,3},{4,2}}
>
>In Mathematica 3.0 is there anyway the output of FactorInteger can be
>modified to produce the unevaluated prime factors in the usual
>exponential form ? 

Your implementation seems to have a problem figuring out that four is a
power of two.

2^4 3^3 4^2

6912

FactorInteger[%] /. 
	{n_Integer, m_Integer} -> HoldForm[n^m]

\!\(\*
  RowBox[{"{", 
    RowBox[{
      TagBox[\(2\^8\),
        HoldForm], ",", 
      TagBox[\(3\^3\),
        HoldForm]}], "}"}]\)

Bob Hanlon


  • Prev by Date: Re: loading packages-followup
  • Next by Date: contour plots from non-rectangular matrices
  • Previous by thread: Re: FactorInteger
  • Next by thread: Re: FactorInteger