1 | initial version |
Well, sage can compute / give a simpler formula for
sage: sum(log(k), k, 1, n)
log(factorial(n))
but cannot do something "more exactly" with
sage: sum(k*log(k), k, 1, n)
sum(k*log(k), k, 1, n)
sage: sum(k*(log(k))^2, k, 1, n)
sum(k*log(k)^2, k, 1, n)
... so we have to solve or work as humans. (For instance by taking the last term in each sum...)
sage: limit(sum(k*log(k), k, n, n), n=infinity)
+Infinity
... or by writing down the simultaneously converging integral, which diverges, so produces a ValueError.
sage: integral( k*log(k), k, 1, oo )
ValueError: Integral is divergent.