OFFSET
1,4
FORMULA
G.f.: 1/(1-x) * Sum_{k>=1} x^(3*k)/(1-x^k) = 1/(1-x) * Sum_{k>=3} x^k/(1-x^k).
a(n) = A006218(n)-n-floor(n/2). - Chai Wah Wu, Oct 30 2023
PROG
(PARI) a(n) = sum(k=3, n, n\k);
(Python)
from math import isqrt
def A366968(n): return -(s:=isqrt(n))**2+(sum(n//k for k in range(3, s+1))<<1)+n+(n>>1) if n>3 else int(n>2) # Chai Wah Wu, Oct 30 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Oct 30 2023
STATUS
approved