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.

A335870 a(n) is the least k > 0 such that T^k(n) = T^(2*k)(n) (where T^k denotes the k-th iterate of A006370, the Collatz map); a(n) = -1 if no such k exists.

Original entry on oeis.org

1, 3, 3, 6, 3, 3, 6, 15, 3, 18, 6, 12, 9, 9, 15, 15, 3, 12, 18, 18, 6, 6, 15, 15, 9, 21, 9, 111, 18, 18, 18, 105, 3, 24, 12, 12, 21, 21, 21, 33, 6, 108, 6, 27, 15, 15, 15, 102, 9, 24, 24, 24, 9, 9, 111, 111, 18, 30, 18, 30, 18, 18, 105, 105, 6, 27, 27, 27, 12
Offset: 0

Views

Author

Rémy Sigrist, Jun 28 2020

Keywords

Comments

If the Collatz conjecture is true, then a(n) > 0 for all n >= 0.

Examples

			For n = 3 we have:
    k  T^k(3)  T^(2*k)(3)
    -  ------  ----------
    1      10           5
    2       5           8
    3      16           2
    4       8           4
    5       4           1
    6       2           2
so a(3) = 6.
		

Crossrefs

Programs

  • PARI
    a(n, T=x->if (x%2, 3*x+1, x/2)) = my (x1=n, x2=n); for (k=1, oo, x1=T(x1); x2=T(T(x2)); if (x1==x2, return (k)))