OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Wikipedia, Bijective numeration
EXAMPLE
4 = 12_bij2, 5 = 21_bij2, 18 = 1122_bij2, 20 = 1212_bij2.
MAPLE
p:= proc(n) local d, m, r; m:= n; r:= 0;
while m>0 do d:= irem(m, 2, 'm');
if d=0 then d:=2; m:= m-1 fi;
r:= r+x^d
od;
simplify(r/(x+x^2))::integer
end:
a:= proc(n) option remember; local k;
for k from 1+`if`(n=1, 0, a(n-1)) by 1
while not p(k) do od; k
end:
seq(a(n), n=1..70);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, May 29 2015
STATUS
approved