OFFSET
1,2
COMMENTS
LINKS
Martin Ehrenstein, Table of n, a(n) for n = 1..38
EXAMPLE
k = 5: Sum_{i=1..5} (i - d(i))/k = 5/5 = 1, so k = 5 is a term.
MATHEMATICA
seq[kmax_] := Module[{sum = 0, s = {}}, Do[sum += k - DivisorSigma[0, k]; If[Divisible[sum, k], AppendTo[s, k]], {k, 1, kmax}]; s]; seq[10^6] (* Amiram Eldar, May 06 2023 *)
PROG
(PARI) isok(k) = !(sum(i=1, k, i - numdiv(i)) % k); \\ Michel Marcus, May 06 2023
(Python)
from itertools import count, islice
from sympy import divisor_count
def A362864_gen(): # generator of terms
c = 0
for k in count(1):
if not (c:=c+k-divisor_count(k))%k:
yield k
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, May 06 2023
EXTENSIONS
More terms from Amiram Eldar, May 06 2023
a(24)-a(32) from Martin Ehrenstein, May 22 2023
STATUS
approved