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.

A375267 Number of iterations of the A375265 map to reach 1 starting from n, or -1 if 1 is never reached.

Original entry on oeis.org

0, 1, 1, 2, 5, 2, 16, 3, 2, 6, 14, 3, 9, 17, 6, 4, 12, 3, 20, 7, 17, 15, 15, 4, 23, 10, 3, 18, 18, 7, 106, 5, 15, 13, 13, 4, 21, 21, 10, 8, 109, 18, 29, 16, 7, 16, 104, 5, 24, 24, 13, 11, 11, 4, 112, 19, 21, 19, 32, 8, 19, 107, 18, 6, 27, 16, 27, 14, 16, 14, 102
Offset: 1

Views

Author

Paolo Xausa, Aug 09 2024

Keywords

Examples

			a(10) = 6 because the trajectory 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 consists of 6 steps.
		

Crossrefs

(Row lengths of A375266) - 1.

Programs

  • Mathematica
    A375265[n_] := Which[Divisible[n, 3], n/3, Divisible[n, 2], n/2, True, 3*n + 1];
    Array[Length[NestWhileList[A375265, #, # > 1 &]] - 1 &, 100]