login
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.
1
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,1
COMMENTS
This sequence includes all primes >= 3 because A000203(p)/A000005(p) = (p + 1)/2 AND (A000217(p) - A000203(p))/A049820(p) = (p + 1)/2.
Up to 2 * 10^8 the only nonprime terms are 20 and 432. - Robert Israel, May 06 2024
LINKS
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
Intersection of A003601 and A140826.
Sequence in context: A171014 A254050 A250094 * A285516 A319801 A339907
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Feb 09 2022
STATUS
approved