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.

A378833 Number of tripling steps in the 3x-1 trajectory from n to the minimum of its cycle, or -1 if n never reaches a cycle.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 4, 0, 1, 1, 3, 1, 2, 0, 0, 4, 2, 0, 3, 1, 1, 1, 6, 3, 1, 1, 2, 2, 2, 0, 7, 0, 4, 4, 5, 2, 3, 0, 3, 3, 1, 1, 8, 1, 5, 1, 6, 6, 3, 3, 4, 1, 4, 1, 9, 2, 2, 2, 2, 2, 6, 0, 12, 7, 7, 0, 5, 4, 5, 4, 5, 5, 2, 2, 3, 3, 3, 0, 7, 3, 3, 3, 8, 1, 13
Offset: 1

Views

Author

Kevin Ryde, Dec 08 2024

Keywords

Comments

The 3x-1 iteration is x -> 3x-1 if x odd, or x -> x/2 if x even (A001281).
The cycle minima presently known are 1, 5 and 17.
a(n) = 0 iff n = m*2^k where m is one of the cycle minima.

Crossrefs

Cf. A001281 (step), A135730 (total steps), A377524 (halving steps).

Formula

a(n) = A135730(n) - A377524(n), if a(n) != -1.