%I #17 Feb 23 2020 06:42:14
%S 1,4,3,4,6,6,10,9,12,11,15,13,15,18,22,16,21,24,21,20,30,25,28,24,31,
%T 36,27,29,36,32,36,36,37,36,44,37,45,49,48,44,45,47,45,53,46,49,55,54,
%U 59,61,61,68,55,54,65,57,61,64,66,68,66,64,70,64,77,85,78,83,75,73,78,73
%N Add up the positive integers that are coprime to n in order (starting at 1). a(n) is the smallest such partial sum that is >= n.
%C a(2) = 1+3. Every other a(n) of the sequence involves only adding integers that are <= n.
%H Amiram Eldar, <a href="/A117893/b117893.txt">Table of n, a(n) for n = 1..10000</a>
%e 12 is coprime to 1, 5, 7, 11,... Now 1 = 1, 1+5 = 6, 1+5+7 = 13, 1+5+7+11 = 24, ... 13 is the smallest such partial sum that is >= 12. So a(12) = 13.
%p printf("1,4,") ; for n from 3 to 60 do resul :=0 ; for m from 1 to 1000 do if gcd(n, m) <= 1 then resul := resul + m ; if resul >= n then printf("%a,", resul) ; break ; fi ; fi ; od : od: # _R. J. Mathar_, Apr 02 2006
%t f[n_] := Block[{k = 1, s},While[s = Plus @@ Select[Range[k], GCD[ #, n] == 1 &]; s < n, k++ ];s];Table[f[n], {n, 75}] (* _Ray Chandler_, Dec 11 2006 *)
%Y Cf. A117892, A125748, A125749.
%Y Cf. A092933.
%K nonn
%O 1,2
%A _Leroy Quet_, Mar 30 2006
%E More terms from _R. J. Mathar_, Apr 02 2006
%E a(61) and later terms from _Ray Chandler_, Dec 11 2006