Re: Special Prime Product

*To*: mathgroup at smc.vnet.net*Subject*: [mg53403] Re: Special Prime Product*From*: Paul Abbott <paul at physics.uwa.edu.au>*Date*: Mon, 10 Jan 2005 00:13:46 -0500 (EST)*Organization*: The University of Western Australia*References*: <cro3ga$hgo$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

In article <cro3ga$hgo$1 at smc.vnet.net>, "Gilmar" <gilmar.rodriguez at nwfwmd.state.fl.us> wrote: > I'm attempting to form a product: > _____ > | | (p-2) > | | ------- > | | (p-1) > p Prime, p|n > > I call the program: > > << NumberTheory`NumberTheoryFunctions` > and use the function "PrimeFactorList" in it, to build > the following module: > > specpriprod[n_]:= > Module[{v},v=Product[(primeFactorList[n][[i]]-2)/(primeFactorList[n][[i]]-2), > {i,Length[PrimeFactorList[n]]}];v] > > specpriprod is an abbreviation for "Special Prime Product". > > When I evaluate: > Table[{n,specprimprod[n]},{n,4,100,2}] > > I only get specprimprod[n] = 0 for n even between 4 and 100. > Help! and Thank you for your help! > Others have pointed out the error in your code. I would just like to add that at http://mathworld.wolfram.com/PrimeProducts.html you will find some relevant formulas along with a downloadable Mathematica Notebook. 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) 35 Stirling Highway Crawley WA 6009 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul