OFFSET
1,2
COMMENTS
The sequence is infinite because (p^p)' = p^p, for any p prime number (A051674).
If m = 2^k (A000079) then 2^m is a term. Indeed, 2^m has a single 1 in binary expansion and (2^m)' = m*2^(m-1) = 2^(2^k + k - 1) also has a single 1 in its binary expansion.
If p is a prime number of the form p = 4*k + 1 (A002144), then 4*p is a term. Indeed, if p is in A002144, then its binary expansion is of the form b_1_b_2...b_k01, and for 4*p it is b_1_b_2...b_k0100. Because (4*p)' = 4*(p + 1) = 4*p + 4 the binary expansion of the number 4*p + 4 is b_1_b_2....b_k0100 + 100 = b_1_b_2....b_k1000, so with the same number of digits 1.
EXAMPLE
0' = 0, so 0 is a term.
2 = 10_2 and 2' = 1 = 1_2, so 2 is a term.
20 = 10100_2 and 20' = 24 = 11000_2, so 20 is a term.
MAPLE
d:= n-> n*add(i[2]/i[1], i=ifactors(n)[2]):
q:= n-> (f-> is(f(n)=f(d(n))))(t-> add(i, i=Bits[Split](t))):
select(q, [$0..300])[]; # Alois P. Heinz, Jan 26 2022
MATHEMATICA
d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Range[0, 300], Equal @@ DigitCount[{#, d[#]}, 2, 1] &] (* Amiram Eldar, Jan 25 2022 *)
PROG
(Magma) f:=func<n |n le 1 select 0 else n*(&+[Factorisation(n)[i][2] / Factorisation(n)[i][1]: i in [1..#Factorisation(n)]])>; [n: n in [0..265]|&+Intseq(n, 2) eq &+Intseq(Floor(f(n)), 2)];
(PARI) d(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
isok(k) = hammingweight(k) == hammingweight(d(k)); \\ Michel Marcus, Jan 25 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Jan 24 2022
STATUS
approved