OFFSET
0,3
EXAMPLE
The sequence's terms, among terms a(0) through a(5), which are coprime to 6 are a(0)=1,a(1)=1,a(3)=5 and a(4)=11. So a(6) is the numerator of 1 +1 +1/5 +1/11 = 126/55, which is 126.
MATHEMATICA
f[l_List] := Sum[1/l[[k]], {k, Length[l]}]; g[l_List] := Block[{n = Length[l]}, Append[l, Numerator@f[Select[l, GCD[ #, n] == 1 &]]]]; Nest[g, {1}, 12] (* Ray Chandler, Jan 04 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 02 2007
EXTENSIONS
Extended by Ray Chandler, Jan 04 2007
STATUS
approved