OFFSET
0,2
COMMENTS
Conjecture. a(n) >= 0 for all n.
EXAMPLE
MATHEMATICA
bw[n_] := DigitCount[n, 2, 1]; d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); seq[m_, nmax_] := Module[{s = Table[-1, {m + 1}], c = 0, n = 0, i}, While[c < m + 1 && n < nmax, i = bw[n] + 1; If[i <= m && s[[i]] < 0, If[bw[d[n]] + 1 == i, c++; s[[i]] = n]]; n++]; TakeWhile[s, # > -1 &]]; seq[16, 10^6] (* Amiram Eldar, Jan 27 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)]])>; a:=[]; for n in [0..22] do k:=2^n-1 ; while &+Intseq(k, 2) ne n or &+Intseq( Floor(f(k)), 2) ne n do k:=k+1; end while; Append(~a, k*1); end for; a;
(PARI) d(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
a(n) = my(k=2^n-1); while ((hammingweight(k) != n) || (hammingweight(d(k)) != n), k++); k; \\ Michel Marcus, Jan 25 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Jan 24 2022
EXTENSIONS
a(30)-a(32) from Jinyuan Wang, Jan 27 2022
STATUS
approved