login
A162362
a(n) = A066186(n) - A004125(n).
1
1, 4, 8, 19, 31, 63, 97, 168, 258, 407, 594, 907, 1285, 1859, 2604, 3660, 4998, 6883, 9246, 12479, 16562, 21967, 28767, 37715, 48847, 63224, 81145, 103980, 132234, 167982, 211935, 267001, 334535, 418343, 520687, 646974, 800336, 988322
OFFSET
1,2
EXAMPLE
1(=1-0), 4(=4-0), 8(=9-1), 19(=20-1), 31(=35-4), 63(=66-3), 97(=105-8), etc.
PROG
(Python)
from math import isqrt
from sympy import npartitions
def A162362(n): return n*(npartitions(n)-n)-((s:=isqrt(n))**2*(s+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1, s+1))>>1) # Chai Wah Wu, Oct 22 2023
CROSSREFS
Sequence in context: A272110 A272542 A280114 * A274817 A130887 A049933
KEYWORD
nonn
AUTHOR
EXTENSIONS
Entries checked by R. J. Mathar, May 21 2010
STATUS
approved