Re: Sum of Prime factors
- To: mathgroup at smc.vnet.net
- Subject: [mg30887] Re: Sum of Prime factors
- From: gleam at flashmail.com (Mr. Wizard)
- Date: Sun, 23 Sep 2001 02:16:27 -0400 (EDT)
- Organization: The Math Forum
- References: <9o98p1$cqi$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I believe that this is both the fastest and most compact code yet provided: digitsum = Tr[#2 Tr@IntegerDigits@# & @@@ FactorInteger@#] &;