OFFSET
0,3
EXAMPLE
a(0)=1, a(1)=1, a(5)=7 are the terms which are coprime to 12 and which occur among {a(0),a(1),...a(11)}. 1 and 7 are the two largest of these terms, so a(12) = 1 + 7 = 8.
MATHEMATICA
f[s_] := Append[s, Plus @@ Take[Sort[Select[s, GCD[ #, Length[s]] == 1 &]], -2]]; Nest[f, {1, 1}, 64] (* Ray Chandler, Sep 11 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 07 2006
EXTENSIONS
Extended by Ray Chandler and Robert G. Wilson v, Sep 11 2006
STATUS
approved