OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from Clark Kimberling)
MAPLE
g:= proc() local l, s; l, s:= [1], {1}:
proc(n) option remember; local i, r; r:= l[1];
l:= subsop(1=NULL, l);
for i in [1+r, r+r] do if not i in s then
l, s:=[l[], i], s union {i} fi
od; r
end
end():
a:= proc() local t, a; t, a:= 0, proc() -1 end;
proc(n) local h;
while a(n) < 0 do
t:= t+1; h:= g(t);
if a(h) < 0 then a(h):= t fi
od; a(n)
end
end():
seq(a(n), n=1..100); # Alois P. Heinz, Sep 14 2021
MATHEMATICA
z = 12; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1]]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]] (* A232559 *)
Table[Length[g1[n]], {n, 1, z}] (* Fibonacci numbers *)
t1 = Flatten[Table[Position[t, n], {n, 1, 200}]] (* A232560 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Nov 26 2013
STATUS
approved