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.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Stefan Gog, Nov 26 2019

Keywords

Crossrefs

Cf. A308651.

Programs

  • 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
  • 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)
    
Showing 1-1 of 1 results.