login
A140237
A number n is included if (Sum_{k=1..n} d(k)) is divisible by d(n), where d(n) is the number of positive divisors of n.
2
1, 5, 7, 8, 16, 17, 19, 20, 23, 25, 37, 41, 42, 43, 47, 49, 64, 65, 67, 68, 69, 70, 71, 73, 74, 77, 79, 101, 103, 107, 108, 109, 113, 149, 150, 151, 155, 157, 163, 164, 165, 166, 167, 169, 197, 199, 211, 223, 257, 259, 263, 264, 265, 267, 268, 269, 271, 274, 275, 277
OFFSET
1,2
COMMENTS
sum{k=1 to n} d(k) = sum{k=1 to n} floor(n/k) = A006218(n).
LINKS
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)))
A140237_list = list(islice(A140237_gen(), 30)) # Chai Wah Wu, Oct 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 14 2008
EXTENSIONS
Extended by Ray Chandler, Jun 25 2009
STATUS
approved