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 A351205 #15 Mar 14 2022 09:28:28 %S A351205 5,9,10,17,18,20,21,22,26,27,33,34,36,37,40,41,42,43,45,46,51,53,54, %T A351205 58,65,66,68,69,72,73,74,75,76,77,80,81,82,83,84,85,86,87,89,90,91,93, %U A351205 94,99,100,101,102,105,106,107,108,109,110,117,118,119,122,129 %N A351205 Numbers whose binary expansion does not have all distinct runs. %H A351205 Mathematics Stack Exchange, <a href="https://math.stackexchange.com/q/87559">What is a sequence run? (answered 2011-12-01)</a> %e A351205 The terms together with their binary expansions begin: %e A351205 5: 101 41: 101001 74: 1001010 %e A351205 9: 1001 42: 101010 75: 1001011 %e A351205 10: 1010 43: 101011 76: 1001100 %e A351205 17: 10001 45: 101101 77: 1001101 %e A351205 18: 10010 46: 101110 80: 1010000 %e A351205 20: 10100 51: 110011 81: 1010001 %e A351205 21: 10101 53: 110101 82: 1010010 %e A351205 22: 10110 54: 110110 83: 1010011 %e A351205 26: 11010 58: 111010 84: 1010100 %e A351205 27: 11011 65: 1000001 85: 1010101 %e A351205 33: 100001 66: 1000010 86: 1010110 %e A351205 34: 100010 68: 1000100 87: 1010111 %e A351205 36: 100100 69: 1000101 89: 1011001 %e A351205 37: 100101 72: 1001000 90: 1011010 %e A351205 40: 101000 73: 1001001 91: 1011011 %e A351205 For example, 77 has binary expansion 1001101, with runs 1, 00, 11, 0, 1, which are not all distinct, so 77 is in the sequence. %p A351205 q:= proc(n) uses ListTools; (l-> is(nops(l)<>add( %p A351205 nops(i), i={Split(`=`, l, 1)}) +add( %p A351205 nops(i), i={Split(`=`, l, 0)})))(Bits[Split](n)) %p A351205 end: %p A351205 select(q, [$1..200])[]; # _Alois P. Heinz_, Mar 14 2022 %t A351205 Select[Range[0,100],!UnsameQ@@Split[IntegerDigits[#,2]]&] %o A351205 (Python) %o A351205 from itertools import groupby, product %o A351205 def ok(n): %o A351205 runs = [(k, len(list(g))) for k, g in groupby(bin(n)[2:])] %o A351205 return len(runs) > len(set(runs)) %o A351205 print([k for k in range(130) if ok(k)]) # _Michael S. Branicky_, Feb 09 2022 %Y A351205 Runs in binary expansion are counted by A005811, distinct A297770. %Y A351205 The complement is A175413, for run-lengths A044813. %Y A351205 The version for standard compositions is A351291, complement A351290. %Y A351205 A000120 counts binary weight. %Y A351205 A011782 counts integer compositions. %Y A351205 A242882 counts compositions with distinct multiplicities. %Y A351205 A318928 gives runs-resistance of binary expansion. %Y A351205 A325545 counts compositions with distinct differences. %Y A351205 A333489 ranks anti-runs, complement A348612, counted by A003242. %Y A351205 A334028 counts distinct parts in standard compositions. %Y A351205 A351014 counts distinct runs in standard compositions. %Y A351205 Counting words with all distinct runs: %Y A351205 - A351013 = compositions, for run-lengths A329739. %Y A351205 - A351016 = binary words, for run-lengths A351017. %Y A351205 - A351018 = binary expansions, for run-lengths A032020. %Y A351205 - A351200 = patterns, for run-lengths A351292. %Y A351205 - A351202 = permutations of prime factors. %Y A351205 Cf. A070939, A085207, A098859, A233564, A238130 or A238279, A283353, A328592, A350952, A351015, A351203. %K A351205 nonn,base %O A351205 1,1 %A A351205 _Gus Wiseman_, Feb 07 2022