OFFSET
1,2
COMMENTS
sum{k=1 to n} d(k) = sum{k=1 to n} floor(n/k) = A006218(n).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
MATHEMATICA
s = 0; Reap[Do[If[Divisible[s += #, #], Sow[i]] &[DivisorSigma[0, i]], {i, 280}] ][[-1, 1]] (* Michael De Vlieger, Oct 23 2023 *)
PROG
(Python)
from math import isqrt
from sympy import divisor_count
def A140237_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: not (-(s:=isqrt(n))**2+(sum(n//k for k in range(1, s+1))<<1))%divisor_count(n), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 14 2008
EXTENSIONS
Extended by Ray Chandler, Jun 25 2009
STATUS
approved