MathGroup Archive 2001

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

Search the Archive

Re: Sum of Prime factors

  • To: mathgroup at
  • Subject: [mg30887] Re: Sum of Prime factors
  • From: gleam at (Mr. Wizard)
  • Date: Sun, 23 Sep 2001 02:16:27 -0400 (EDT)
  • Organization: The Math Forum
  • References: <9o98p1$cqi$>
  • Sender: owner-wri-mathgroup at

I believe that this is both the fastest and most compact code yet

digitsum = Tr[#2 Tr@IntegerDigits@# & @@@ FactorInteger@#] &;

  • Prev by Date: Use of Mathematica under UNIx
  • Next by Date: Gamma Simplification
  • Previous by thread: RE: Sum of Prime factors
  • Next by thread: Kernel Based Learning w/ SVM on Mathematica