# Does AsymptoticSum work with Arithmetical Number Theoretic Functions?

The recent function AsymptoticSum works as follows:

AsymptoticSum[1/k, {k, 1, n}, n -> \[Infinity]]


with expected result:

Log[n].


This function would be very helpful (for me) if it worked on the Arithmetical Functions, so I tried:

AsymptoticSum[DivisorSigma[0, k], {k, 1, n}, n -> Infinity]


the expected result is:

n Log[n] + (2 EulerGamma - 1) n


Sadly, the function did not evaluate.

Is it possible to make AsymptoticSum work with functions like DivisorSigma? If not, what are exactly the limitations of the function?

• As a rule, arithmetic functions have irregular behavior so their asymptotic properties are hardly implementable in MMA. Mar 25 '20 at 15:52
• Yes, arithmetical functions are irregular, BUT: their sums are remarkably regular and have nice corresponding asymptotic functions. - I disagree that they are "hardly" implementable. Mar 25 '20 at 16:36
• Your statement "their sums are remarkably regular" does not correspond to reality: not always. Of course, the certain asymptotic properties of arithmetic functions may be implemented in MMA through tables, but that way is not very well. Here is an example of such type implementation: version 12.0 knows DiscreteLimit[nSin[2*Pin!*Exp[1],n->Infinity], but fails with a simpler one DiscreteLimit[Sin[2*Pi*n!*Exp[1],n->Infinity]. Mar 25 '20 at 18:05
• There is quite a body of theory about the asymptotics of Number Theoretic functions which -could- be implemented, Sin does not belong to that class of functions. Are you a Wolfram Engineer? Mar 25 '20 at 18:22
• In any case, you raised an important topic. My personal thanks to you. I am neither a specialist in number theory nor a WRI employee. Mar 25 '20 at 18:43

## 1 Answer

Although AsymptoticSum appears to not presently have the functionality you require, I expect that it will be added, since the required expansions are known and tabulated here. Note that all the code from the functions website can be loaded into and used directly in Mathematica.

For a partial answer to your question that might be useful to you, I've uploaded a Notebook here.