

A348664


Numbers whose binary expansion is not rich.


1



203, 211, 300, 308, 333, 357, 395, 406, 407, 419, 422, 423, 459, 467, 556, 564, 600, 601, 604, 616, 617, 628, 653, 666, 667, 669, 690, 709, 714, 715, 723, 741, 779, 787, 790, 791, 803, 811, 812, 813, 814, 815, 820, 835, 838, 839, 844, 845, 846, 847, 851, 869
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

A word of length k is "rich" if it contains, as contiguous subsequences, exactly k + 1 distinct palindromes (including the empty word).
There are A225681(k)/2 terms with k binary digits.


LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..10000


FORMULA

{k: A137397(k) <= A070939(k)}.  Michael S. Branicky, Oct 29 2021


EXAMPLE

For n = 203:
 the binary expansion of 203 is "11001011" and has 8 binary digits,
 we have the following 8 palindromes: "", "0", "1", "00", "11", "010", "101", "1001"
 so 203 is not rich, and belongs to this sequence.
For n = 204:
 the binary expansion of 204 is "11001100" and has 8 binary digits,
 we have the following 9 palindromes: "", "0", "1", "00", "11", "0110", "1001", "001100", "110011"
 so 204 is rich, and does not belong to this sequence.


MATHEMATICA

Select[Range@1000, Length@Select[Union[Subsequences[s=IntegerDigits[#, 2]]], PalindromeQ]<=Length@s&] (* Giorgos Kalogeropoulos, Oct 29 2021 *)


PROG

(PARI) is(n) = { my (b=binary(n), p=select(w>w==Vecrev(w), setbinop((i, j)>b[i..j], [1..#b]))); #b!=#p }
(Python)
def ispal(s): return s == s[::1]
def ok(n):
s = bin(n)[2:]
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])))
print([k for k in range(870) if ok(k)]) # Michael S. Branicky, Oct 29 2021


CROSSREFS

Cf. A206926, A216264, A225681, A070939, A137397.
Sequence in context: A198981 A259330 A090486 * A228320 A346899 A247921
Adjacent sequences: A348661 A348662 A348663 * A348665 A348666 A348667


KEYWORD

nonn,base


AUTHOR

Rémy Sigrist, Oct 28 2021


STATUS

approved



