Re: Re: Looking for Window Version of "Factorization.m" program
- To: mathgroup at smc.vnet.net
- Subject: [mg53530] Re: [mg53507] Re: [mg53500] Looking for Window Version of "Factorization.m" program
- From: DrBob <drbob at bigfoot.com>
- Date: Sat, 15 Jan 2005 21:08:10 -0500 (EST)
- References: <200501150644.BAA25311@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Here's a mod to my earlier post that makes exponents add in multiplied factorForms: factorForm[i_Integer] := Times @@ Power @@@ (FactorInteger@i /. { x_Integer, y_Integer} -> {HoldForm[x], y}) TableForm[Array[ Random[Integer, 100000] &, {3, 2}] /. x_Integer -> x == factorForm@x] factorForm[2400] factorForm[2500] factorForm[2400] factorForm[2500] HoldForm[2]^5*HoldForm[3]*HoldForm[5]^2 HoldForm[2]^2*HoldForm[5]^4 HoldForm[2]^7*HoldForm[3]*HoldForm[5]^6 Bobby On Sat, 15 Jan 2005 01:44:06 -0500 (EST), Bob Hanlon <hanlonr at cox.net> wrote: > Factorization[n_, opts___] := > Times@@(FactorInteger[n,opts] /. > {x_,y_} :> HoldForm[x^y]); > > n=2400; > > Factorization[n] > > HoldForm[2^5]*HoldForm[3^1]*HoldForm[5^2] > > n==ReleaseHold[%] > > True > > Factorization[n, GaussianIntegers->True] > > HoldForm[I^1]*HoldForm[(1 + I)^10]*HoldForm[(1 + 2*I)^2]* > HoldForm[(2 + I)^2]*HoldForm[3^1] > > n==ReleaseHold[%] > > True > > n=6+8*I; > > Factorization[n] > > HoldForm[(-I)^1]*HoldForm[(1 + I)^2]*HoldForm[(2 + I)^2] > > n==ReleaseHold[%] > > True > > > Bob Hanlon > >> >> From: "Gilmar" <gilmar.rodriguez at nwfwmd.state.fl.us> To: mathgroup at smc.vnet.net >> Date: 2005/01/14 Fri AM 08:55:02 EST >> To: mathgroup at smc.vnet.net >> Subject: [mg53530] [mg53507] [mg53500] Looking for Window Version of "Factorization.m" > program >> >> I'm attempting to use the program "Factorization" available at: >> >> http://forums.wolfram.com/mathgroup/archive/1995/Apr/ > msg00109.html. >> >> After copying the file "Factorization.m" into the directory: >> >> "C:\Program Files\Wolfram >> Research\Mathematica\5.1\AddOns\StandardPackages\NumberTheory" >> >> and calling the program via: >> >> <<NumberTheory`Factorization` >> >> Mathematica gives me a string of messages: >> "SetDelayed::Write : Tag Cos in Cos[Pix_Factorization] >> is Protected". >> >> When I inspect the code in Factorization.m, I find that >> this program is built for the Macinstosh. The author >> is no longer available at his e-mail address. >> >> Does anyone have a Windows version of this program? >> >> The program gives the prime decomposition of an integer >> in terms of powers of primes in the attractive form: >> >> Factorization[n] =(p1^a1)*(p2^a2)*...(pn^an) >> >> rather than the form given by "FactorInteger[n]"; namely, >> n ={{p1,a1},{p2,a2},...{pn,an}}. Factorization[n] is also >> capable of producing a similar factorization for a Complex >> number. >> >> Thank you for your help! >> >> > > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Re: Looking for Window Version of "Factorization.m" program
- From: Bob Hanlon <hanlonr@cox.net>
- Re: Looking for Window Version of "Factorization.m" program