OFFSET
1,1
COMMENTS
Numbers with Hamming weight 2 that have the arithmetic derivative with Hamming weight 2.
If p is in A019434 then m = 4*p is a term. Indeed p = 2^k + 1 and m' = 4*p + 4 = 4 (p + 1) = 4*(2^k + 2) = 8*(2^(k - 1) +1) = 2^(k + 2) + 2^3 and m, m' have only two of 1 in the expansion binary.
Numbers of the form m = 5*2^s, where s = (16^k - 1)/5, s >= 1, are terms. Indeed m = 4*2^s + 2^s = 2^(s + 2) + 2^s and m' = 2^s + 5*s*2^(s - 1) = 2^(s - 1)*(5*s + 2) = 2^(s - 1)*(16^k + 1) = 2^(4*k + s - 1) + 2^(s - 1), so m is a term.
Numbers of the form m = 3*2^s, where s = (4^k - 1)/3, s >= 1, are terms. Indeed m = 2*2^s + 2^s = 2^(s + 1) + 2^s and m' = 2^s + 3*s*2^(s - 1) = 2^(s - 1)*(3*s + 2) = 2^(s - 1)*(4^k + 1) = 2^(2*k + s - 1) + 2^(s - 1), so m is a term.
EXAMPLE
6 = 110_2 = 2^2 + 2^1 and 6' = 5 = 101_2 = 2^2 + 2^0, so 6 is a term.
9 = 1001_2 = 2^3 + 2^0 and 9' = 6 = 110_2, so 9 is a term.
20 = 10100_2 = 2^4 + 2^2 and 20' = 24 = 11000_2 = 2^4 + 2^3, so 20 is a term.
MATHEMATICA
d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Union[Plus @@@ (2^Subsets[Range[0, 86], {2}])], Count[IntegerDigits[d[#], 2], 1] == 2 &] (* Amiram Eldar, Oct 21 2022 *)
PROG
(Magma) f1:=func<n|Multiplicity(Intseq(n, 2), 1) eq 2>; f:=func<n |n le 1 select 0 else n*(&+[Factorisation(n)[i][2] / Factorisation(n)[i][1]: i in [1..#Factorisation(n)]]) >; a:=[]; for n in [1..75] do sn:=[2^n+2^k: k in [0..n-1]]; for i in [1..#sn] do if f1(sn[i]) and f1(Floor(f(sn[i]))) then Append(~a, sn[i]); end if; end for; end for; a;
(PARI) ish2(n) = hammingweight(n)==2; \\ A018900
ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
isok(m) = ish2(m) && ish2(ad(m)); \\ Michel Marcus, Oct 23 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Oct 20 2022
STATUS
approved