|
|
A117893
|
|
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.
|
|
5
|
|
|
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, 36, 27, 29, 36, 32, 36, 36, 37, 36, 44, 37, 45, 49, 48, 44, 45, 47, 45, 53, 46, 49, 55, 54, 59, 61, 61, 68, 55, 54, 65, 57, 61, 64, 66, 68, 66, 64, 70, 64, 77, 85, 78, 83, 75, 73, 78, 73
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(2) = 1+3. Every other a(n) of the sequence involves only adding integers that are <= n.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
MAPLE
|
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
|
|
MATHEMATICA
|
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 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|