login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A344622
a(n) = n*(n+1)/2 - sigma(n) + d(n).
0
1, 2, 4, 6, 11, 13, 22, 25, 35, 41, 56, 56, 79, 85, 100, 110, 137, 138, 172, 174, 203, 221, 254, 248, 297, 313, 342, 356, 407, 401, 466, 471, 517, 545, 586, 584, 667, 685, 728, 738, 821, 815, 904, 912, 963, 1013, 1082, 1062, 1171, 1188, 1258, 1286, 1379, 1373, 1472, 1484
OFFSET
1,2
COMMENTS
For 1 <= k <= n, add 1 if k|n, otherwise add k. For example, a(12) = 1 + 1 + 1 + 1 + 5 + 1 + 7 + 8 + 9 + 10 + 11 + 1 = 56.
If p is prime, a(p) = p*(p+1)/2 - sigma(p) + d(p) = p*(p+1)/2 - (p+1) + 2 = 1 + p*(p-1)/2.
FORMULA
a(n) = Sum_{k=1..n} k^(ceiling(n/k)-floor(n/k)).
EXAMPLE
a(10) = 10*(10+1)/2 - sigma(10) + d(10) = 55 - 18 + 4 = 41.
MATHEMATICA
Table[n (n + 1)/2 - DivisorSigma[1, n] + DivisorSigma[0, n], {n, 80}]
PROG
(PARI) a(n) = n*(n+1)/2 - sigma(n) + numdiv(n); \\ Michel Marcus, May 25 2021
CROSSREFS
Cf. A000005 (tau), A000203 (sigma).
Sequence in context: A078198 A171865 A372622 * A068059 A108868 A274261
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 24 2021
STATUS
approved