OFFSET
1,2
EXAMPLE
The positive integers which are coprime to 12 are 1,5,7,11,13,... Now 1+5 = 6, which is less than 12; but 1+5+7 is 13, which is >= 12. 7 is the 3rd positive integer which is coprime to 12, so a(12) = 3.
MATHEMATICA
f[n_] := Block[{k = 1, l}, While[l = Select[Range[k], GCD[ #, n] == 1 &]; Plus @@ l < n, k++ ]; Length[l]]; Table[f[n], {n, 100}] (* Ray Chandler, Dec 11 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 06 2006
EXTENSIONS
Extended by Ray Chandler, Dec 11 2006
STATUS
approved