I need to perform a function that calculates the $n$th term of the next succession:
$1, 6, 16, 37, 63, 113, 163, 248, 339, 469, 591, 801, 971, 1221$...
For more information about the succession, I leave you this link.
I have tried to do it with the following code:
succession(n) :=
sum(divsum(k,2), k, 1, n)$
For small numbers, such as six or seven, it works. But, the problem is that they ask me to make the program able to compile the following cases:
succession(10^17)
succession(12^24)
I have already raised this question in stackOverflow, but many have recommended I post it here.
Thanks.