OFFSET
3,1
COMMENTS
a(1) and a(2) are undefined, because the two first terms of A006995 are 0 and 1; and 0 times and 1 times any binary palindrome are binary palindromes, obviously.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 3..10000
PROG
(Python)
from itertools import count, islice, product
def is_bin_pal(n): return (b:=bin(n)[2:]) == b[::-1]
def bin_pals(): # generator of positive binary palindromes in base 10
yield 1
digits, midrange = 2, [[""], ["0", "1"]]
for digits in count(2):
for p in product("01", repeat=digits//2-1):
left = "1"+"".join(p)
for middle in midrange[digits%2]:
yield int(left + middle + left[::-1], 2)
def agen(): # generator of terms
g = bin_pals(); next(g)
for n in count(3):
bn = next(g)
yield next(k*bn for k in bin_pals() if not is_bin_pal(k*bn))
print(list(islice(agen(), 46))) # Michael S. Branicky, Jan 09 2023
CROSSREFS
KEYWORD
AUTHOR
Leroy Quet, Mar 11 2010
EXTENSIONS
Extended by Ray Chandler, Mar 13 2010
Offset 3 from Michel Marcus, Jan 09 2023
STATUS
approved