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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A329983 For any n > 0, define the sequence b(1) = n, b(i+1) = (b(i) * i) mod (b(i) + i); a(n) is the least i such that b(i) = 0, or -1 if 0 is never reached. 1
 1, 13, 3, 85, 13, 85, 7, 58, 4, 13, 7, 85, 5, 7, 13, 58, 58, 85, 85, 13, 5, 85, 7, 291, 13, 85, 58, 85, 58, 7, 85, 291, 85, 85, 13, 58, 13, 58, 291, 11, 6, 58, 13, 7, 13, 85, 7, 291, 58, 85, 9, 85, 7, 13, 13, 58, 85, 13, 9, 58, 291, 291, 13, 11 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Rémy Sigrist, Table of n, a(n) for n = 0..10000 PROG (Python) def k(a, b): return ((a*b)%(a+b)) numberList=[] def repeat(a): i=1 while a!=0: a= k(a, i) i=i+1 numberList.append(i) for x in range(10000): repeat(x) print(numberList) (PARI) f(m, n) = (m*n) % (m+n); a(n) = {my(i=1); while (n, n = f(n, i); i++; ); i; } \\ Michel Marcus, Nov 28 2019 CROSSREFS Cf. A308651. Sequence in context: A297874 A298137 A155847 * A204594 A204157 A010219 Adjacent sequences: A329980 A329981 A329982 * A329984 A329985 A329986 KEYWORD nonn AUTHOR Stefan Gog, Nov 26 2019 STATUS approved

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

Last modified September 18 13:18 EDT 2024. Contains 376000 sequences. (Running on oeis4.)