The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125749 a(n) is the smallest positive integer such that (Sum_{1<=k<=a(n), gcd(t(k),n)=1} t(k)) is >= n, where t(k) is the k-th positive integer which is coprime to n. 2
1, 2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 3, 5, 4, 5, 4, 6, 4, 6, 4, 6, 5, 7, 4, 7, 6, 6, 5, 8, 4, 8, 6, 7, 6, 8, 5, 9, 7, 8, 6, 9, 5, 9, 7, 7, 7, 10, 6, 10, 7, 9, 8, 10, 6, 10, 7, 9, 8, 11, 6, 11, 8, 9, 8, 11, 7, 12, 9, 10, 7, 12, 7, 12, 9, 9, 9, 12, 7, 13, 8, 11, 10, 13, 7, 12, 10, 11, 9, 13, 7, 13, 10, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
Sequence in context: A364421 A352631 A134446 * A014085 A248891 A171239
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 06 2006
EXTENSIONS
Extended by Ray Chandler, Dec 11 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 19:25 EDT 2024. Contains 372494 sequences. (Running on oeis4.)