This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A179857 #15 Nov 13 2023 12:28:47 %S A179857 3,3,15,5,15,15,63,9,15,15,63,15,63,63,255,17,23,23,63,23,63,63,255, %T A179857 27,63,63,255,63,255,255,1023,33,39,39,63,39,63,63,255,43,63,63,255, %U A179857 63,255,255,1023,51,63,63,255,63,255,255,1023,63,255,255,1023,255,1023,1023 %N A179857 Smallest number greater than n having in binary representation exactly twice the number of ones as n has in binary representation. %C A179857 a(n) = Min{m: m > n and A000120(m) = 2*A000120(n)}; %C A179857 a(n) is odd; %C A179857 n < a(n) < A000290(A062383(n)); %C A179857 a(A000079(n)) = A000051(n); %C A179857 A024036 and A000225 give record values and where they occur. %H A179857 Reinhard Zumkeller, <a href="/A179857/b179857.txt">Table of n, a(n) for n = 1..1000</a> %H A179857 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %t A179857 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 *) %o A179857 (PARI) a(n) = my(k=n+1, h=hammingweight(n)); while (hammingweight(k) != 2*h, k++); k; \\ _Michel Marcus_, Nov 13 2023 %Y A179857 Cf. A000120, A086799. %Y A179857 Cf. A000290, A062383. %Y A179857 Cf. A000051, A000079. %Y A179857 Cf. A000225, A024036. %K A179857 base,nonn %O A179857 1,1 %A A179857 _Reinhard Zumkeller_, Jul 31 2010 %E A179857 Definition clarified by _Harvey P. Dale_, Sep 20 2016