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 A306441 #8 Feb 25 2019 08:25:22 %S A306441 2,3,4,6,9,7,8,12,10,11,13,14,17,15,16,24,18,19,20,22,37,23,25,28,26, %T A306441 27,29,30,33,31,32,48,34,35,36,38,41,39,40,44,42,43,45,46,53,47,49,56, %U A306441 50,51,52,54,69,55,57,60,58,59,61,62,65,63,64,96,66,67,68 %N A306441 Next larger integer with same number of runs of 1's in its binary representation as n. %C A306441 Number of runs of 1's in binary representation is given by A069010. %C A306441 Each nonnegative number either appears in this sequence or in A002450. %F A306441 a(A023758(n)) = A023758(n+1) for any n > 1. %F A306441 a(A043682(n)) = A043682(n+1) for any n > 0. %F A306441 a(A043683(n)) = A043683(n+1) for any n > 0. %F A306441 a(A043684(n)) = A043684(n+1) for any n > 0. %F A306441 a(A043685(n)) = A043685(n+1) for any n > 0. %F A306441 a(A043686(n)) = A043686(n+1) for any n > 0. %e A306441 The first terms, in decimal and in binary, are: %e A306441 n a(n) bin(n) bin(a(n)) %e A306441 -- ---- ------ --------- %e A306441 1 2 1 10 %e A306441 2 3 10 11 %e A306441 3 4 11 100 %e A306441 4 6 100 110 %e A306441 5 9 101 1001 %e A306441 6 7 110 111 %e A306441 7 8 111 1000 %e A306441 8 12 1000 1100 %e A306441 9 10 1001 1010 %e A306441 10 11 1010 1011 %e A306441 11 13 1011 1101 %e A306441 12 14 1100 1110 %e A306441 13 17 1101 10001 %e A306441 14 15 1110 1111 %e A306441 15 16 1111 10000 %e A306441 16 24 10000 11000 %o A306441 (PARI) r1(n) = my (c=0); while (n, my (v=valuation(n+(n%2),2)); if (n%2, c++); n\=2^v); c %o A306441 a(n) = my (r=r1(n)); for (k=n+1, oo, if (r==r1(k), return (k))) %Y A306441 Cf. A002450, A023758, A043682, A043683, A043684, A043685, A043686, A057168, A069010. %K A306441 nonn,base %O A306441 1,1 %A A306441 _Rémy Sigrist_, Feb 15 2019