The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A082082 Number of steps to reach 1 in the process of expanding the interval (i1,i2) successively to right and left, such that i1 and i2 always stay coprime, starting with (n,n). 1
 1, 1, 3, 1, 3, 5, 4, 5, 7, 4, 9, 7, 9, 9, 10, 9, 7, 10, 13, 13, 14, 10, 14, 15, 17, 18, 19, 16, 18, 21, 16, 17, 22, 17, 23, 20, 24, 23, 22, 24, 27, 24, 28, 28, 26, 28, 28, 30, 28, 33, 34, 27, 35, 35, 36, 36, 35, 32, 32, 38, 35, 39, 43, 38, 44, 41, 36, 45, 45 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,3 COMMENTS In other words: start with (i1=n,i2=n), go up from i2 to the next number coprime to i1. Let this be the new i2. Then go down from i1 to the next number coprime to i2. Let this be the new i1. Then a(n) is the number of these steps needed to reach i1 = 1. Obviously, a(n) < n. LINKS Table of n, a(n) for n=2..70. EXAMPLE Example: (6,6)->(5,7)->(3,8)->(1,10), so a(6) = 3. (7,7)->(5,8)->(4,9)->(3,11)->(2,13)->(1,15), a(7) = 5. PROG (PARI) for(n=2, 100, count=0:left=n:right=n:c=n:g=n:f=1:while(g>1, count=count+1:while(gcd(g, c)>1, c=c+f):g=c: if(f<0, left=c:c=right+1, right=c:c=left-1):f=-f):print1(count/2", ")) CROSSREFS Cf. A084425. Sequence in context: A173039 A016471 A324294 * A016646 A345943 A342342 Adjacent sequences: A082079 A082080 A082081 * A082083 A082084 A082085 KEYWORD nonn AUTHOR Amarnath Murthy, Jun 02 2003 EXTENSIONS Edited by Ralf Stephan, Jun 27 2003 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.

Last modified June 20 10:31 EDT 2024. Contains 373516 sequences. (Running on oeis4.)