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.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Feb 09 2022

Keywords

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

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.
		

Crossrefs

Intersection of A003601 and A140826.

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