OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
4 = 2^2 is in the sequence since the binary representation of 4 is 100 and 1 + 0 + 0 = 1, and the binary representation of 2 is 10 and 1 + 0 = 1.
MAPLE
filter:= proc(n)
if isprime(n) then return false fi;
convert(convert(n, base, 2), `+`) = add(convert(convert(t, base, 2), `+`), t=numtheory:-factorset(n))
end proc:
select(filter, [$2..1000]); # Robert Israel, Nov 28 2019
MATHEMATICA
binWt[n_] := Total @ IntegerDigits[n, 2]; binHoaxQ[n_] := CompositeQ[n] && Total[binWt /@ FactorInteger[n][[;; , 1]]] == binWt[n]; Select[Range[500], binHoaxQ]
PROG
(PARI) is(n)= my(f=factor(n)[, 1]); sum(i=1, #f, hammingweight(f[i]))==hammingweight(n) && !isprime(n) \\ Charles R Greathouse IV, Nov 28 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Nov 24 2019
STATUS
approved