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.

A348412 Numbers whose even divisors have an integer harmonic mean.

Original entry on oeis.org

2, 6, 12, 30, 56, 84, 168, 270, 280, 540, 616, 840, 992, 1092, 1344, 2856, 2976, 3276, 3780, 4590, 5320, 5940, 7560, 12400, 12420, 14880, 16256, 16380, 18848, 24360, 26784, 36036, 37200, 37240, 41664, 48768, 49140, 55692, 60480, 65520, 86304, 86800, 111720, 128520
Offset: 1

Views

Author

Amiram Eldar, Oct 17 2021

Keywords

Comments

The corresponding harmonic means are 2, 3, 4, 5, 6, 7, 9, 9, 10, 12, 11, 15, 10, 13, 16, 17, 15, ...
Equivalently, even numbers k such that the harmonic mean of the divisors of k/2 is either an integer (A001599) or a half-integer (A348411).

Examples

			6 is a term since its even divisors are 2 and 6, and their harmonic mean, 1/((1/2 + 1/6)/2) = 3, is an integer.
		

Crossrefs

A139256 is a subsequence.

Programs

  • Mathematica
    Select[Range[2, 10^5, 2], IntegerQ[HarmonicMean[Select[Divisors[#], EvenQ]]] &]
  • PARI
    isok(m) = if (! (m%2), my(d=select(x->!(x%2), divisors(m))); denominator(#d/sum(k=1, #d, 1/d[k])) == 1); \\ Michel Marcus, Oct 31 2021
  • Python
    from sympy import gcd, divisor_sigma
    A348412_list = [2*n for n in range(1,10**3) if (lambda x, y: 2*gcd(x,y*n)>=x)(divisor_sigma(n),divisor_sigma(n,0))] # Chai Wah Wu, Oct 20 2021