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 A348664 #15 Oct 29 2021 13:32:15 %S A348664 203,211,300,308,333,357,395,406,407,419,422,423,459,467,556,564,600, %T A348664 601,604,616,617,628,653,666,667,669,690,709,714,715,723,741,779,787, %U A348664 790,791,803,811,812,813,814,815,820,835,838,839,844,845,846,847,851,869 %N A348664 Numbers whose binary expansion is not rich. %C A348664 A word of length k is "rich" if it contains, as contiguous subsequences, exactly k + 1 distinct palindromes (including the empty word). %C A348664 There are A225681(k)/2 terms with k binary digits. %H A348664 Rémy Sigrist, <a href="/A348664/b348664.txt">Table of n, a(n) for n = 1..10000</a> %F A348664 {k: A137397(k) <= A070939(k)}. - _Michael S. Branicky_, Oct 29 2021 %e A348664 For n = 203: %e A348664 - the binary expansion of 203 is "11001011" and has 8 binary digits, %e A348664 - we have the following 8 palindromes: "", "0", "1", "00", "11", "010", "101", "1001" %e A348664 - so 203 is not rich, and belongs to this sequence. %e A348664 For n = 204: %e A348664 - the binary expansion of 204 is "11001100" and has 8 binary digits, %e A348664 - we have the following 9 palindromes: "", "0", "1", "00", "11", "0110", "1001", "001100", "110011" %e A348664 - so 204 is rich, and does not belong to this sequence. %t A348664 Select[Range@1000,Length@Select[Union[Subsequences[s=IntegerDigits[#,2]]],PalindromeQ]<=Length@s&] (* _Giorgos Kalogeropoulos_, Oct 29 2021 *) %o A348664 (PARI) is(n) = { my (b=binary(n), p=select(w->w==Vecrev(w), setbinop((i,j)->b[i..j],[1..#b]))); #b!=#p } %o A348664 (Python) %o A348664 def ispal(s): return s == s[::-1] %o A348664 def ok(n): %o A348664 s = bin(n)[2:] %o A348664 return len(s) >= 1 + len(set(s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1) if ispal(s[i:j]))) %o A348664 print([k for k in range(870) if ok(k)]) # _Michael S. Branicky_, Oct 29 2021 %Y A348664 Cf. A206926, A216264, A225681, A070939, A137397. %K A348664 nonn,base %O A348664 1,1 %A A348664 _Rémy Sigrist_, Oct 28 2021