This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A099427 a(1) = 1; for n > 1, a(n) = 1 + greatest common divisor of n and a(n-1). 3
 1, 2, 2, 3, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 6, 7, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(A060401(n)) = n + 1; a(A192489(n)) = 2; [Reinhard Zumkeller, Jul 02 2011] LINKS _Reinhard Zumkeller_, Table of n, a(n) for n = 1..10000 EXAMPLE a(9)=4 because 1+gcd(a(8),9)=1+gcd(3,9)=1+3. MATHEMATICA a[1] = 1; a[n_] := a[n] = GCD[n, a[n - 1]] + 1; Table[ a[n], {n, 105}] (from Robert G. Wilson v Nov 18 2004) PROG (Haskell) a099427 n = a099427_list !! (n-1) a099427_list = 1 : f 2 1 where    f n x = x' : f (n+1) x' where x' = 1 + gcd n x -- Reinhard Zumkeller, Jul 02 2011 CROSSREFS For position of first occurrence of n see A060401. Sequence in context: A073855 A077982 A185816 * A059964 A087458 A052180 Adjacent sequences:  A099424 A099425 A099426 * A099428 A099429 A099430 KEYWORD easy,nonn,nice AUTHOR Gaetan Polard (gaetan27(AT)hotmail.com), Nov 18 2004 EXTENSIONS Edited and extended by Robert G. Wilson v, Nov 18 2004 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .