OFFSET
1,3
EXAMPLE
The positive integers k, where k <= 6 and where each positive integer <= k and coprime to k is also coprime to 6, are 1,2,6. So a(7) = a(1)+a(2)+a(6) = 1+1+14 = 16.
MATHEMATICA
f[n_] := Select[ Range[n], GCD[ #, n] == 1 &]; g[n_] := Select[ Range[n], Times @@ GCD[f[ # ], n] == 1 &]; h[l_List] := Append[l, Plus @@ l[[g[Length[l]]]]]; Nest[h, {1}, 38] (* Ray Chandler, Dec 26 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 25 2006
EXTENSIONS
Extended by Ray Chandler, Dec 26 2006
STATUS
approved