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:= 500: # for terms <= N
S:= ListTools:-PartialSums(map(numtheory:-tau, [$1..N])):
select(t -> igcd(t, S[t])=1, [$1..N]); # Robert Israel, Feb 20 2024
MATHEMATICA
With[{r = Range[200]}, PositionIndex[CoprimeQ[r, Accumulate[DivisorSigma[0, r]]]][True]] (* Paolo Xausa, Feb 21 2024 *)
PROG
(Python)
from math import gcd, isqrt
def A140221_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: gcd(n, -(s:=isqrt(n))**2+(sum(n//k for k in range(1, s+1))<<1))==1, count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 12 2008
EXTENSIONS
More terms from Max Alekseyev, May 10 2009
STATUS
approved