cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A329983 #32 Mar 03 2020 09:57:28
%S A329983 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,
%T A329983 85,58,85,58,7,85,291,85,85,13,58,13,58,291,11,6,58,13,7,13,85,7,291,
%U A329983 58,85,9,85,7,13,13,58,85,13,9,58,291,291,13,11
%N 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.
%H A329983 Rémy Sigrist, <a href="/A329983/b329983.txt">Table of n, a(n) for n = 0..10000</a>
%o A329983 (Python) def k(a,b):
%o A329983     return ((a*b)%(a+b))
%o A329983 numberList=[]
%o A329983 def repeat(a):
%o A329983     i=1
%o A329983     while a!=0:
%o A329983         a= k(a,i)
%o A329983         i=i+1
%o A329983     numberList.append(i)
%o A329983 for x in range(10000):
%o A329983     repeat(x)
%o A329983 print(numberList)
%o A329983 (PARI) f(m, n) = (m*n) % (m+n);
%o A329983 a(n) = {my(i=1); while (n, n = f(n, i); i++;); i;} \\ _Michel Marcus_, Nov 28 2019
%Y A329983 Cf. A308651.
%K A329983 nonn
%O A329983 0,2
%A A329983 _Stefan Gog_, Nov 26 2019