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.

A362804 Numbers k such that the set of divisors {d | k, BitOr(k, d) = k} has an integer harmonic mean.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 24, 28, 30, 32, 45, 48, 56, 60, 64, 90, 96, 112, 120, 128, 180, 192, 224, 240, 256, 360, 384, 448, 480, 496, 512, 720, 768, 896, 960, 992, 1024, 1440, 1536, 1792, 1920, 1984, 2048, 2880, 3072, 3584, 3840, 3968, 4096, 5760, 6144, 7168, 7680
Offset: 1

Views

Author

Amiram Eldar, May 04 2023

Keywords

Comments

Equivalently, the set of divisors can be defined by {d | k, BitAnd(k, d) = d}.
Analogous to harmonic (or Ore) numbers (A001599) where the divisors d of k are restricted by BitOr(k, d) = k or BitAnd(k, d) = d.
If k is a term then so is 2*k. The primitive terms are in A362805. Thus, this sequence includes all the powers of 2 (A000079), all the numbers of the form 3*2^m and 15*2^m for m >= 1, and all the numbers of the form 7*2^m for m >= 2.
All the even perfect numbers (A000396) are terms: if k = 2^(p-1)*(2^p-1) is a perfect number (where p is a Mersenne exponent, A000043), then the only divisors of k such that BitOr(k, d) = k are 2^(p-1) and k itself, and the harmonic mean of 2^(p-1) and 2^(p-1)*(2^p-1) is 2^p - 1.
Are 1 and 45 the only odd terms in this sequence?

Crossrefs

Subsequences: A000079, A007283 \ {3}, A005009 \ {7, 14}, A110286 \ {15}, A362805.
Similar sequences: A001599, A006086, A063947, A286325, A319745.

Programs

  • Mathematica
    q[n_] := IntegerQ[HarmonicMean[Select[Divisors[n], BitAnd[n, #] == # &]]]; Select[Range[10^4], q]
  • PARI
    div(n) = select(x->(bitor(x, n) == n), divisors(n));
    is(n) = {my(d = div(n)); denominator(#d/sum(i = 1, #d, 1/d[i])) == 1;}