MathGroup Archive 2001

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

Search the Archive

RE: Sum of Prime factors

  • To: mathgroup at
  • Subject: [mg30837] RE: [mg30809] Sum of Prime factors
  • From: "Harvey P. Dale" <hpd1 at>
  • Date: Thu, 20 Sep 2001 03:51:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

	This does it:
	sumDPF[n_] := Plus @@ Flatten[IntegerDigits[#] & /@
(Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]])]
	Then: sumDPF[198] yields 10.
Professor Harvey P. Dale
National Center on Philanthropy and the Law
New York University School of Law
Room 206A
110 West 3rd Street
New York, N.Y. 10012-1074
tel: 212-998-6161
fax: 212-995-3149

 -----Original Message-----
From: 	Shyam Sunder Gupta [mailto:cec at] 
To: mathgroup at
Sent:	Wednesday, September 19, 2001 12:17 AM
To:	mathgroup at
Subject:	[mg30809] Sum of Prime factors

Can any body help in providing a simple mathematica code for finding sum 
of digits of prime factors(including repetitions) of a number. For 
example 198 =2*3*3*11 , so sum of digits of prime factors= 

Shyam Sunder Gupta
email: guptass at

This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit

  • Prev by Date: RGBColor [?,?,?]
  • Next by Date: RE: PlotStyles
  • Previous by thread: Re: Sum of Prime factors
  • Next by thread: RE: Sum of Prime factors