OFFSET
0,3
COMMENTS
If, as conjectured, A353709 is a permutation of the nonnegative integers, then this is the inverse permutation.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..16383
Rémy Sigrist, C++ program
MAPLE
b:= proc() false end: t:= 2:
g:= proc(n) option remember; global t; local k; if n<2 then n
else for k from t while b(k) or Bits[And](k, g(n-2))>0
or Bits[And](k, g(n-1))>0 do od; b(k):=true;
while b(t) do t:=t+1 od; k fi
end:
a:= proc() local t, a; t, a:= -1, proc() -1 end;
proc(n) local h;
while a(n) = -1 do
t:= t+1; h:= g(t);
if a(h) = -1 then a(h):= t fi
od; a(n)
end
end():
seq(a(n), n=0..85); # Alois P. Heinz, May 09 2022
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 09 2022
STATUS
approved