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!)
A050424 Numbers for which in base 2 the least number of digits that can be removed to leave a palindrome (possibly beginning with 0) is 5. 3
880, 936, 944, 964, 968, 976, 992, 1504, 1744, 1760, 1776, 1840, 1872, 1888, 1924, 1936, 1944, 1952, 1956, 1960, 1968, 1984, 1986, 1988, 1992, 2000, 2016, 2110, 2111, 2142, 2143, 2158, 2159, 2166, 2167, 2206, 2207, 2222, 2223, 2334, 2335, 2784, 2896, 2912 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

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

PROG

(Python)

from itertools import combinations

def ok(n):

    b = bin(n)[2:]

    for digs_to_remove in range(6):

        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 newb == newb[::-1]: return (digs_to_remove == 5)

    return False

print(list(filter(ok, range(2913)))) # Michael S. Branicky, Aug 15 2021

CROSSREFS

Sequence in context: A063051 A190030 A118799 * A206341 A024393 A006052

Adjacent sequences:  A050421 A050422 A050423 * A050425 A050426 A050427

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

EXTENSIONS

Data corrected by Sean A. Irvine, Aug 15 2021

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 20 12:43 EDT 2021. Contains 348108 sequences. (Running on oeis4.)