OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..3086
EXAMPLE
155 is in the sequence because it is 5*31, and both 5 and 31 are palindromic numbers (with binary representations 101 and 11111, respectively).
MAPLE
dmax:= 10: N:= 2^dmax: # to get all terms < N
revdigs:= proc(n)
local L, Ln, i;
L:= convert(n, base, 2);
Ln:= nops(L);
add(L[i]*2^(Ln-i), i=1..Ln);
end proc:
A:= {}:
for d from 2 to dmax do
if d::even then
A:= A union {seq(2^(d/2)*x + revdigs(x), x=2^(d/2-1)..2^(d/2)-1)}
else
m:= (d-1)/2;
B:={seq(2^(m+1)*x + revdigs(x), x=2^(m-1)..2^m-1)};
A:= A union B union map(`+`, B, 2^m)
fi
od:
R:= {1}:
for b in A do
R:= map(t -> seq(t*b^j, j=0..floor(log[b](N/t))), R)
od:
sort(convert(R, list)); # Robert Israel, Jun 01 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jeffrey Shallit, May 31 2018
STATUS
approved