OFFSET
1,2
COMMENTS
Sum_{k=1..n} d(k) = Sum_{k=1..n} floor(n/k) = A006218(n).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 1000: # for terms <= N
T:= map(numtheory:-tau, [$1..N]):
S:= ListTools:-PartialSums(T):
select(t -> igcd(T[t], S[t])=1, [$1..N]); # Robert Israel, Oct 24 2023
PROG
(Python)
from math import gcd, isqrt
from sympy import divisor_count
def A140238_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: gcd(divisor_count(n), -(s:=isqrt(n))**2+(sum(n//k for k in range(1, s+1))<<1))==1, count(max(startvalue, 1)))
(PARI) isok(k) = gcd(sum(i=1, k, k\i), numdiv(k)) == 1; \\ Michel Marcus, Oct 29 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 14 2008
EXTENSIONS
Extended by Ray Chandler, Jun 25 2009
Name edited by Michel Marcus, Oct 29 2023
STATUS
approved