login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050428 Numbers for which in base 2 the least number of digits that can be removed to leave a base 2 palindromic number (beginning with 1) is 4. 3
16, 48, 80, 88, 104, 112, 144, 152, 156, 184, 200, 228, 232, 240, 272, 280, 284, 286, 296, 300, 302, 316, 328, 336, 344, 348, 376, 392, 420, 424, 432, 440, 452, 466, 468, 472, 482, 484, 488, 496, 528, 536, 540, 542, 543, 552, 556, 558, 559, 564, 566, 574, 606 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..53.

EXAMPLE

(64 base 2) = 10000 -> 1.

PROG

(Python)

from itertools import combinations

def ok(n):

    b = bin(n)[2:]

    for digs_to_remove in range(5):

        for skip in combinations(range(len(b)), digs_to_remove):

            newb = "".join(b[i] for i in range(len(b)) if i not in skip)

            if len(newb) > 0 and newb[0] == '1' and newb == newb[::-1]:

                return (digs_to_remove == 4)

    return False

print(list(filter(ok, range(607)))) # Michael S. Branicky, Aug 24 2021

CROSSREFS

Cf. A050423, A050425, A050426, A050427, A050429.

Sequence in context: A336595 A069084 A084112 * A134605 A035008 A189972

Adjacent sequences:  A050425 A050426 A050427 * A050429 A050430 A050431

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 27 21:54 EDT 2021. Contains 348290 sequences. (Running on oeis4.)