|
Search: id:A117892
|
|
|
| A117892 |
|
Add up the positive integers which are coprime to n in order (starting at 1). a(n) is the largest such partial sum that is <= n. |
|
+0 3
|
|
| 1, 1, 3, 4, 3, 6, 6, 4, 7, 4, 10, 6, 10, 9, 14, 16, 15, 13, 15, 20, 20, 16, 21, 24, 23, 25, 27, 18, 28, 19, 28, 25, 27, 25, 33, 24, 36, 36, 37, 31, 36, 30, 36, 38, 33, 36, 45, 37, 48, 44, 48, 51, 45, 54, 52, 42, 48, 49, 55, 49, 55, 49, 54, 64, 63, 62, 66, 64, 61, 54, 66, 54, 66
(list; graph; listen)
|
|
|
OFFSET
|
1,3
|
|
|
EXAMPLE
|
12 is coprime to 1, 5, 7, 11,... Now 1 = 1, 1+5 = 6, 1+5+7 = 13, 1+5+7+11 = 24, ... 6 is the highest such partial sum that is <= 12. So a(12) = 6.
|
|
MATHEMATICA
|
f[n_] := Block[{k = 1, t, s}, While[t = Plus @@ Select[Range[k], GCD[ #, n] == 1 &]; t <= n, s = t; k++ ]; s]; Table[f[n], {n, 80}] (*Chandler*)
|
|
CROSSREFS
|
Cf. A092933, A117893.
Sequence in context: A110738 A005092 A136195 this_sequence A074372 A049276 A101684
Adjacent sequences: A117889 A117890 A117891 this_sequence A117893 A117894 A117895
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), Mar 30 2006
|
|
EXTENSIONS
|
Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Dec 11 2006
|
|
|
Search completed in 0.002 seconds
|