OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..7500
EXAMPLE
MAPLE
g:= proc(n) convert(convert(n, base, 2), `+`) end proc:
filter:= proc(n) local d, t;
if isprime(n) then return false fi;
t:= g(n);
andmap(d -> g(d) * g(n/d) = t, select(d -> d^2 <= n, numtheory:-divisors(n)))
end proc:
select(filter, [seq(i, i=3..10000, 2)]);
MATHEMATICA
q[n_] := CompositeQ[n] && Ordering[(d = DigitCount[Divisors[n], 2, 1])*Reverse[d], -1][[1]] == Length[d]; Select[Range[3, 3100, 2], q] (* Amiram Eldar, Sep 04 2023 *)
PROG
(PARI) is(n) = if(n%2 != 1 || isprime(n), return(0)); my(h=hammingweight(n), d=divisors(n), i); for(i=2, (#d+1)\2, if(hammingweight(d[i]) * hammingweight(d[#d+1-i]) > h, return(0))); n > 1 \\ David A. Corneth, Sep 04 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Sep 03 2023
STATUS
approved