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

%I #9 May 04 2023 14:57:57

%S 1,2,4,6,8,12,16,24,28,30,32,45,48,56,60,64,90,96,112,120,128,180,192,

%T 224,240,256,360,384,448,480,496,512,720,768,896,960,992,1024,1440,

%U 1536,1792,1920,1984,2048,2880,3072,3584,3840,3968,4096,5760,6144,7168,7680

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

%C Equivalently, the set of divisors can be defined by {d | k, BitAnd(k, d) = d}.

%C 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.

%C 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.

%C 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.

%C Are 1 and 45 the only odd terms in this sequence?

%H Amiram Eldar, <a href="/A362804/b362804.txt">Table of n, a(n) for n = 1..406</a>

%t q[n_] := IntegerQ[HarmonicMean[Select[Divisors[n], BitAnd[n, #] == # &]]]; Select[Range[10^4], q]

%o (PARI) div(n) = select(x->(bitor(x, n) == n), divisors(n));

%o is(n) = {my(d = div(n)); denominator(#d/sum(i = 1, #d, 1/d[i])) == 1;}

%Y Cf. A000043, A000396, A246600, A246601.

%Y Subsequences: A000079, A007283 \ {3}, A005009 \ {7, 14}, A110286 \ {15}, A362805.

%Y Similar sequences: A001599, A006086, A063947, A286325, A319745.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, May 04 2023