OFFSET
1,3
COMMENTS
Base-2 analog of A347346.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
PROG
(Python)
def A347347(n):
if n % 2 == 0:
return 0
s = bin(n)[2:]
if s == s[::-1]:
return n
for i in range(1, len(s)):
if s[:-i]== s[-i-1::-1]:
return int(s[:-i-1:-1]+s, 2)
CROSSREFS
KEYWORD
AUTHOR
Chai Wah Wu, Aug 27 2021
STATUS
approved