OFFSET
1,5
COMMENTS
LINKS
Enrique Pérez Herrero, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{i=1..n} floor(n/i) mod ceiling(n/i). - Wesley Ivan Hurt, Sep 15 2017
MATHEMATICA
Table[Plus@@(Floor[n/#]&/@Select[Range[n], !Divisible[n, #]&]), {n, 1, 20}] (* Enrique Pérez Herrero, Dec 25 2012 *)
PROG
(Python)
from math import isqrt
from sympy import divisor_sigma
def A098798(n): return -(s:=isqrt(n))**2+(sum(n//k for k in range(1, s+1))<<1)-divisor_sigma(n) # Chai Wah Wu, Oct 23 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Oct 05 2004
STATUS
approved