login
The OEIS is supported by the many generous donors to the OEIS 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
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
Sequence in context: A336595 A069084 A084112 * A134605 A035008 A189972
KEYWORD
nonn,base
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 00:02 EDT 2024. Contains 372317 sequences. (Running on oeis4.)