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-4 of 4 results.

A375268 Row sums of A375266.

Original entry on oeis.org

1, 3, 4, 7, 36, 9, 288, 15, 13, 46, 259, 19, 119, 302, 51, 31, 214, 27, 519, 66, 309, 281, 633, 39, 658, 145, 40, 330, 442, 76, 101104, 63, 292, 248, 540, 55, 535, 557, 158, 106, 101331, 344, 1338, 325, 96, 679, 100979, 79, 806, 708, 265, 197, 399, 81, 102316, 386
Offset: 1

Views

Author

Paolo Xausa, Aug 09 2024

Keywords

Crossrefs

Programs

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

Formula

a(n) = Sum_{k = 1..A375267(n) + 1} A375266(n,k).

A375265 a(n) = n/3 if n mod 3 = 0; otherwise a(n) = n/2 if n mod 2 = 0; otherwise a(n) = 3*n + 1.

Original entry on oeis.org

4, 1, 1, 2, 16, 2, 22, 4, 3, 5, 34, 4, 40, 7, 5, 8, 52, 6, 58, 10, 7, 11, 70, 8, 76, 13, 9, 14, 88, 10, 94, 16, 11, 17, 106, 12, 112, 19, 13, 20, 124, 14, 130, 22, 15, 23, 142, 16, 148, 25, 17, 26, 160, 18, 166, 28, 19, 29, 178, 20, 184, 31, 21, 32, 196, 22, 202, 34, 23
Offset: 1

Views

Author

Paolo Xausa, Aug 08 2024

Keywords

Comments

Anderson (1987) reformulates the 3x+1 conjecture using this function.

Crossrefs

Cf. A375266 (trajectories).

Programs

  • Maple
    a := n -> ifelse(irem(n, 3) = 0, iquo(n, 3), ifelse(irem(n, 2) = 0, iquo(n, 2), 3*n + 1)): seq(a(n), n = 1..69);  # Peter Luschny, Aug 14 2024
  • Mathematica
    A375265[n_] := Which[Divisible[n, 3], n/3, Divisible[n, 2], n/2, True,3*n + 1];
    Array[A375265, 100]

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]

A375280 Largest value in the trajectory of n in the A375265 map.

Original entry on oeis.org

1, 2, 3, 4, 16, 6, 52, 8, 9, 16, 52, 12, 40, 52, 16, 16, 52, 18, 88, 20, 52, 52, 160, 24, 88, 40, 27, 52, 88, 30, 9232, 32, 52, 52, 160, 36, 112, 88, 40, 40, 9232, 52, 196, 52, 45, 160, 9232, 48, 148, 88, 52, 52, 160, 54, 9232, 56, 88, 88, 304, 60, 184, 9232, 63
Offset: 1

Views

Author

Paolo Xausa, Aug 09 2024

Keywords

Comments

By definition the trajectory ends when 1 is reached, so a(1) = 1.

Examples

			a(10) = 16 because 16 is the largest value in the trajectory 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1.
		

Crossrefs

Programs

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

Formula

a(n) = max{A375266(n,k) for 1 <= k <= A375267(n) + 1}.
Showing 1-4 of 4 results.