OFFSET
1,2
LINKS
Zak Seidov, Table of n, a(n) for n = 1..2443
MAPLE
# Define A109671:
f:=proc(n) option remember; local t1;
if n = 1 then RETURN(1);
elif n mod 2 = 0 then RETURN(f(n/2));
else t1:= f(n-2)-f((n-1)/2);
if t1 > 0 then RETURN(t1) else RETURN(f(n-2)+f((n-1)/2)); fi; fi; end;
# Compute A169741:
M:=50000: M2:=100;
b1:=[seq(f(n), n=1..M)]: b2:=array(1..M);
for n from 1 to M do b2[n]:=-1; od:
for n from 1 to M do i:=b1[n]; if b2[i]<0 then b2[i]:=n; fi; od:
[seq(b2[i], i=1..M2)];
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 02 2010
STATUS
approved