OFFSET
1,1
COMMENTS
LINKS
MATHEMATICA
br2[n_]:=Module[{k=If[EvenQ[n], n+1, n+2], t=2*DigitCount[n, 2, 1]}, While[ DigitCount[ k, 2, 1]!=t, k=k+2]; k]; Array[br2, 70] (* Harvey P. Dale, Sep 20 2016 *)
PROG
(PARI) a(n) = my(k=n+1, h=hammingweight(n)); while (hammingweight(k) != 2*h, k++); k; \\ Michel Marcus, Nov 13 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Jul 31 2010
EXTENSIONS
Definition clarified by Harvey P. Dale, Sep 20 2016
STATUS
approved