cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362864 Numbers k that divide Sum_{i=1..k} (i - d(i)), where d(n) is the number of divisors of n (A000005).

This page as a plain text file.
%I A362864 #46 May 28 2023 11:17:26
%S A362864 1,2,5,8,15,24,26,47,121,204,347,562,4204,6937,6947,31108,379097,
%T A362864 379131,379133,2801205,12554202,20698345,56264197,13767391064,
%U A362864 37423648626,37423648726,61701166395,276525443156,276525443176,455913379395,455913379831,751674084802
%N A362864 Numbers k that divide Sum_{i=1..k} (i - d(i)), where d(n) is the number of divisors of n (A000005).
%C A362864 Numbers k such that the mean number of nondivisors in the range 1..k is an integer.
%C A362864 Numbers k such that A161664(k) is divisible by k.
%C A362864 Numbers k such that (A000217(k) - A006218(k)) is divisible by k.
%C A362864 The subsequence of odd terms k equals the intersection of A050226 and this sequence.
%H A362864 Martin Ehrenstein, <a href="/A362864/b362864.txt">Table of n, a(n) for n = 1..38</a>
%e A362864 k = 5: Sum_{i=1..5} (i - d(i))/k = 5/5 = 1, so k = 5 is a term.
%t A362864 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 *)
%o A362864 (PARI) isok(k) = !(sum(i=1, k, i - numdiv(i)) % k); \\ _Michel Marcus_, May 06 2023
%o A362864 (Python)
%o A362864 from itertools import count, islice
%o A362864 from sympy import divisor_count
%o A362864 def A362864_gen(): # generator of terms
%o A362864     c = 0
%o A362864     for k in count(1):
%o A362864         if not (c:=c+k-divisor_count(k))%k:
%o A362864             yield k
%o A362864 A362864_list = list(islice(A362864_gen(),15)) # _Chai Wah Wu_, May 20 2023
%Y A362864 Cf. A000005, A000217, A006218, A049820, A050226, A161664.
%K A362864 nonn
%O A362864 1,2
%A A362864 _Ctibor O. Zizka_, May 06 2023
%E A362864 More terms from _Amiram Eldar_, May 06 2023
%E A362864 a(24)-a(32) from _Martin Ehrenstein_, May 22 2023