New in Wolfram Mathematica 7: New Number Theory Capabilities  previous | next 
Sum over Divisors
A sampling of sums over divisors.
In[1]:=

Click for copyable input
problems = {HoldForm[DivisorSum[20, f]], 

   HoldForm[DivisorSum[20, f, EvenQ]], 

   HoldForm[DivisorSum[20, f, PrimeQ]], 

   HoldForm[DivisorSum[n, MoebiusMu]], 

   HoldForm[DivisorSum[n, EulerPhi]], 

   HoldForm[DivisorSum[n, #^2 + 1 &]], 

   HoldForm[DivisorSum[n, (#^2 + (n + 1) MoebiusMu[#])/# &]], 

   HoldForm[DivisorSum[n, Sin[Pi/2 #] &]]};
In[2]:=

Click for copyable input
Text @ TraditionalForm @ 

  Grid[{#, "==", ReleaseHold[#]} & /@ problems, Alignment -> {Left}, 

   Dividers -> {{True, False, False, True}}, 

   Background -> LightYellow, Frame -> All, Spacings -> {1, 2}]
Out[2]=