OFFSET
0,3
COMMENTS
A067576 describes the sequences with a fixed number of binary bits using antidiagonals.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
The array begins:
0
1 2
3 5 6
4 8 16 32
7 11 13 14 19
9 10 12 17 18 20
15 23 27 29 30 39 43
...
so the initial terms are 0 1 3 4 7 9 15 ...
MAPLE
A086772aux := proc(n, k)
option remember;
local a, npr, kpr, fnd ;
if n = 0 then
return 0;
end if;
if k = 0 then
for a from 1 do
fnd := false;
for npr from 1 to n-1 do
for kpr from 0 to npr do
if procname(npr, kpr) = a then
fnd := true;
break;
end if;
end do:
end do:
if not fnd then
return a;
end if;
end do:
else
for a from 1 do
if wt(a) = wt(procname(n, 0)) then
fnd := false;
for npr from 1 to n-1 do
for kpr from 0 to npr do
if procname(npr, kpr) = a then
fnd := true;
break;
end if;
end do:
end do:
for kpr from 0 to k-1 do
if procname(n, kpr) = a then
fnd := true;
break;
end if;
end do:
if not fnd then
return a;
end if;
end if;
end do:
end if;
end proc:
A086772 := proc(n)
A086772aux(n, 0) ;
end proc: # R. J. Mathar, Sep 15 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alford Arnold, Aug 03 2003
STATUS
approved