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.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A372748 a(1) = 3; for n > 1, a(n) = a(n - 1) if GCD(n - 1, a(n - 1)) = 1, otherwise a(n) = n - 1 - a(n - 1) / GCD(n - 1, a(n - 1)). 1
 3, 3, 3, 2, 3, 3, 5, 5, 5, 5, 9, 9, 9, 9, 9, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 61, 61, 61, 61, 61, 61, 61, 61 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS a(n) = n/2 for n from {4,6,10,26,62,122,298,626,1094,2186,...}. LINKS Paolo Xausa, Table of n, a(n) for n = 1..10000 EXAMPLE a(1) = 3. a(2) = 3 because GCD(1,3) = 1. a(3) = 3 because GCD(2,3) = 1. a(4) = 3 - 3/GCD(3,3) = 2. and so on. MATHEMATICA Block[{n = 0}, NestList[If[CoprimeQ[++n, #], #, n - #/GCD[n, #]] &, 3, 100]] (* Paolo Xausa, May 12 2024 *) CROSSREFS Cf. A000040, A133058. Sequence in context: A226895 A306996 A166007 * A087497 A085767 A082127 Adjacent sequences: A372745 A372746 A372747 * A372749 A372750 A372751 KEYWORD nonn AUTHOR Ctibor O. Zizka, May 12 2024 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 15 19:43 EDT 2024. Contains 373410 sequences. (Running on oeis4.)