login
A363735
a(n) = Sum_{k=0..n} n^notdivides(k, n), where notdivides(k, n) = 0 if k divides n, otherwise 1.
5
1, 2, 4, 8, 11, 22, 22, 44, 44, 66, 74, 112, 90, 158, 158, 184, 197, 274, 240, 344, 306, 382, 422, 508, 416, 578, 602, 652, 650, 814, 698, 932, 870, 994, 1058, 1124, 1017, 1334, 1334, 1408, 1328, 1642, 1478, 1808, 1722, 1806, 1982, 2164, 1882, 2306, 2256, 2452
OFFSET
0,2
LINKS
FORMULA
a(n) = (1 - n) * tau(n) + n * (1 + n) for n >= 1, where tau = A000005.
a(n) + A363734(n) = (n + 1)^2.
a(n) - A363734(n) = A363421(n).
MATHEMATICA
A363735[n_]:=If[n==0, 1, n(n+1)+(1-n)DivisorSigma[0, n]]; Array[A363735, 100, 0] (* Paolo Xausa, Aug 06 2023 *)
PROG
(SageMath)
print([sum(n^(not k.divides(n)) for k in srange(n + 1)) for n in srange(52)])
(Python)
from sympy import divisor_count
def A363735(n): return n*(n+1)-(n-1)*divisor_count(n) if n else 1 # Chai Wah Wu, Jun 28 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jun 27 2023
STATUS
approved