OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 1000: # to get all terms <= N
bcr:= proc(n) local L, m;
L:= convert(n, base, 2);
m:= nops(L);
add((1-L[i])*2^(m-i), i=1..m)
end proc:
A035928:= select(`<=`, {seq(seq(x*2^d + bcr(x), x=2^(d-1)..2^d-1), d=1..(ilog2(N)+1)/2)}, N):
MATHEMATICA
max = 1000;
bcrQ[n_] := Module[{idn2 = IntegerDigits[n, 2]}, Reverse[idn2 /. {1 -> 0, 0 -> 1}] == idn2];
A035928 = Select[Range[max], bcrQ];
Union[Total /@ Tuples[A035928, 2], A035928] // Select[#, # <= max&]& (* Jean-François Alcover, Jul 29 2020, after Harvey P. Dale in A035928 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Nov 22 2016
STATUS
approved