A339009 Numbers k such that the average number of odd divisors of {1..k} is an integer.
1, 2, 165, 170, 1274, 9437, 69720, 69732, 69734, 69736, 515230, 515236, 515246, 28132043, 28132063, 28132079
Offset: 1
Examples
165 is in the sequence because the average number of odd divisors of {1..165} is an integer: A060831(165) / 165 = 495 / 165 = 3.
Links
- Eric Weisstein's World of Mathematics, Odd Divisor Function.
Programs
-
Mathematica
s[n_] := Module[{c = 0, k = 1, sum = 0, seq = {}}, While[c < n, sum += DivisorSigma[0, k/2^IntegerExponent[k, 2]]; If[Divisible[sum, k], c++; AppendTo[seq, k]]; k++]; seq]; s[13] (* Amiram Eldar, Nov 18 2020 *)
-
PARI
f(n) = my(n2=n\2); sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2-sum(k=1, sqrtint(n2), n2\k)*2+sqrtint(n2)^2; \\ A060831 isok(k) = (f(k) % k) == 0; \\ Michel Marcus, Nov 25 2020
Comments