OFFSET
1,4
EXAMPLE
The positive integers < 8 and coprime to 8 and 9 are 1,5,7. So a(8) = a(1) + a(5) + a(7) = 1+1+3 = 5.
MATHEMATICA
f[l_List] := Block[{n = Length[l] + 1}, Append[l, Plus @@ l[[Select[Range[n], GCD[ #, n*(n + 1)] == 1 &]]]]]; Nest[f, {1}, 50] (* Ray Chandler, Nov 26 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 26 2006
EXTENSIONS
Extended by Ray Chandler, Nov 26 2006
STATUS
approved