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.

A375266 Irregular triangle read by rows in which row n lists the iterates of the A375265 map from n to 1.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 2, 1, 5, 16, 8, 4, 2, 1, 6, 2, 1, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 8, 4, 2, 1, 9, 3, 1, 10, 5, 16, 8, 4, 2, 1, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 12, 4, 2, 1, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1
Offset: 1

Views

Author

Paolo Xausa, Aug 08 2024

Keywords

Comments

By definition the trajectory ends when 1 is reached, so row 1 does not contain the cycle 1 -> 4 -> 2 -> 1.
See A375265 for links.

Examples

			Triangle begins:
   1;
   2,  1;
   3,  1;
   4,  2,  1;
   5, 16,  8,  4,  2,  1;
   6,  2,  1;
   7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10,  5, 16,  8,  4,  2,  1;
   8,  4,  2,  1;
   9,  3,  1;
  10,  5, 16,  8,  4,  2,  1;
  ...
		

Crossrefs

Cf. A375265, A375267 (# of iterations), A375268 (row sums), A375280 (row maxs).

Programs

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