The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A362864 Numbers k that divide Sum_{i=1..k} (i - d(i)), where d(n) is the number of divisors of n (A000005). 1
1, 2, 5, 8, 15, 24, 26, 47, 121, 204, 347, 562, 4204, 6937, 6947, 31108, 379097, 379131, 379133, 2801205, 12554202, 20698345, 56264197, 13767391064, 37423648626, 37423648726, 61701166395, 276525443156, 276525443176, 455913379395, 455913379831, 751674084802 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Numbers k such that the mean number of nondivisors in the range 1..k is an integer.
Numbers k such that A161664(k) is divisible by k.
Numbers k such that (A000217(k) - A006218(k)) is divisible by k.
The subsequence of odd terms k equals the intersection of A050226 and this sequence.
LINKS
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
A362864_list = list(islice(A362864_gen(), 15)) # Chai Wah Wu, May 20 2023
CROSSREFS
Sequence in context: A058884 A073335 A239258 * A309551 A309625 A309630
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 12:26 EDT 2024. Contains 372600 sequences. (Running on oeis4.)