A351398 Numbers k >= 3 such that the arithmetic mean of the divisors of k AND the arithmetic mean of the nondivisors of k are integers.
3, 5, 7, 11, 13, 17, 19, 20, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1
Keywords
Examples
k = 13, A000203(13)/A000005(13) = 14/2 = 7, A024816(13)/A049820(13) = 77/11 = 7, so 13 is a term. k = 20, A000203(20)/A000005(20) = 42/6 = 7, A024816(20)/A049820(20) = 168/14 = 12, so 20 is a term.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local s,t; s:= numtheory:-sigma(n); t:= numtheory:-tau(n); (s/t)::integer and ((n*(n+1)/2 - s)/(n-t))::integer; end proc: select(filter, [$2..1000]); # Robert Israel, May 06 2024
-
Mathematica
Select[Range[2, 350], Divisible[(s = DivisorSigma[1, #]), (d = DivisorSigma[0, #])] && Divisible[#*(# + 1)/2 - s, # - d] &] (* Amiram Eldar, Feb 09 2022 *)
-
PARI
isok(k) = if (k>=3, my(sk=sigma(k), nk=numdiv(k), tk=k*(k+1)/2); !(sk % nk) && !((tk - sk) % (k - nk))); \\ Michel Marcus, Feb 10 2022
Comments