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.

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.

This page as a plain text file.
%I A351398 #48 May 09 2024 04:27:05
%S A351398 3,5,7,11,13,17,19,20,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,
%T A351398 97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,
%U A351398 181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293
%N 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.
%C A351398 This sequence includes all primes >= 3 because A000203(p)/A000005(p) = (p + 1)/2 AND (A000217(p) - A000203(p))/A049820(p) = (p + 1)/2.
%C A351398 Up to 2 * 10^8 the only nonprime terms are 20 and 432. - _Robert Israel_, May 06 2024
%H A351398 Robert Israel, <a href="/A351398/b351398.txt">Table of n, a(n) for n = 1..10000</a>
%e A351398 k = 13, A000203(13)/A000005(13) = 14/2 = 7, A024816(13)/A049820(13) = 77/11 = 7, so 13 is a term.
%e A351398 k = 20, A000203(20)/A000005(20) = 42/6 = 7, A024816(20)/A049820(20) = 168/14 = 12, so 20 is a term.
%p A351398 filter:= proc(n) local s,t;
%p A351398   s:= numtheory:-sigma(n);
%p A351398   t:= numtheory:-tau(n);
%p A351398   (s/t)::integer and ((n*(n+1)/2 - s)/(n-t))::integer;
%p A351398 end proc:
%p A351398 select(filter, [$2..1000]); # _Robert Israel_, May 06 2024
%t A351398 Select[Range[2, 350], Divisible[(s = DivisorSigma[1, #]), (d = DivisorSigma[0, #])] && Divisible[#*(# + 1)/2 - s, # - d] &] (* _Amiram Eldar_, Feb 09 2022 *)
%o A351398 (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
%Y A351398 Cf. A000005, A000203, A000217, A024816, A049820.
%Y A351398 Intersection of A003601 and A140826.
%K A351398 nonn
%O A351398 1,1
%A A351398 _Ctibor O. Zizka_, Feb 09 2022