OFFSET
1,3
EXAMPLE
The positive integers coprime to a(k) and <= a(k), for 1<=k<=8, are for a(1):{1}, for a(2):{1}, for a(3):{1}, for a(4):{1,3}, for a(5):{1,3,5,7}, for a(6):{1,3}, for a(7):{1,5,7,11} and for a(8):{1,3,5,7,...,29,31}.
Those terms a(k), 1<=k<=8, which don't have any integers which are not coprime to 9 among those positive integers which are <=a(k) and coprime to a(k) are the terms a(1)=1,a(2)=1,a(3)=2 and a(7)=12. So a(9) = 1+1+2+12 = 16.
MATHEMATICA
f[n_, k_] := Select[Range[k], GCD[ #, n] == 1 &]; g[l_List] := Block[{fn = f[Length[l] + 1, Max @@ l]}, Append[l, Plus @@ Select[l, Union[f[ #, # ], fn] == fn &]]]; Nest[g, {1}, 60] (* Ray Chandler, Dec 21 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 20 2006
EXTENSIONS
Extended by Ray Chandler, Dec 21 2006
STATUS
approved