login
A363734
a(n) = Sum_{k=0..n} n^divides(k, n), where divides(k, n) = 1 if k divides n, otherwise 0.
5
0, 2, 5, 8, 14, 14, 27, 20, 37, 34, 47, 32, 79, 38, 67, 72, 92, 50, 121, 56, 135, 102, 107, 68, 209, 98, 127, 132, 191, 86, 263, 92, 219, 162, 167, 172, 352, 110, 187, 192, 353, 122, 371, 128, 303, 310, 227, 140, 519, 194, 345, 252, 359, 158, 479, 272, 497
OFFSET
0,2
LINKS
FORMULA
a(n) = (n - 1) * tau(n) + n + 1 for n >= 1, where tau = A000005.
a(n) + A363735(n) = (n + 1)^2.
A363735(n) - a(n) = A363421(n).
MATHEMATICA
A363734[n_]:=If[n==0, 0, n+1+(n-1)DivisorSigma[0, n]]; Array[A363734, 100, 0] (* Paolo Xausa, Aug 06 2023 *)
PROG
(SageMath)
print([sum(n^k.divides(n) for k in srange(n+1)) for n in srange(57)])
(Python)
from sympy import divisor_count
def A363734(n): return (n-1)*divisor_count(n)+n+1 if n else 0 # Chai Wah Wu, Jun 28 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jun 27 2023
STATUS
approved