OFFSET
1,2
EXAMPLE
The positive integers coprime to k and <= k, for 1<=k<=8, are for 1:{1}, for 2:{1}, for 3:{1,2}, for 4:{1,3}, for 5:{1,2,3,4}, for 6:{1,5}, for 7:{1, 2,3,4,5,6} and for 8:{1,3,5,7}.
Those positive integers k which don't have any integers which are not coprime to 8 among those positive integers which are <=k and coprime to k are 1,2,4,6,8. So a(8) = 1+2+4+6+8 = 21.
MATHEMATICA
f[n_] := Select[Range[n], GCD[ #, n] == 1 &]; g[n_] := Block[{fn = f[n]}, Sum[k*Boole[Union[f[k], fn] == fn], {k, n}]]; Table[g[n], {n, 61}] (* Ray Chandler, Dec 20 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 20 2006
EXTENSIONS
Extended by Ray Chandler, Dec 20 2006
STATUS
approved