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.
%I A350044 #70 Dec 29 2021 17:54:38 %S A350044 187,566,283,854,427,1286,643,1934,967,2906,1453,4364,2182,1091,3278, %T A350044 1639,4922,2461,7388,3694,1847,5546,2773,8324,4162,2081,6248,3124, %U A350044 1562,781,2348,1174,587,1766,883,2654,1327,3986,1993,5984,2992,1496,748,374,187,566,283,854 %N A350044 Loop starting at 187 in the Collatz-like map {x -> 3x+5 if x is odd, x/2 otherwise}. %C A350044 Repeats every forty-four terms starting at 187. Although other loops exist for the "3x+5" map, including 5 -> 20 -> 10 -> 5 and 19 -> 62 -> 31 -> 98 -> 49 -> 152 -> 76 -> 38 -> 19, this loop is much longer and does not appear in the trajectories of as many numbers. %C A350044 If the Collatz conjecture is false, it will most likely fail because of the existence of a long loop. %C A350044 a(n) never ends with 0 or 5. a(n+4) - a(n) ends with 0 or 5. - _Paul Curtz_, Dec 29 2021 %H A350044 J. C. Lagarias, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa56/aa5614.pdf">The set of rational cycles for the 3x+1 problem</a>, Acta Arithmetica, LVI (1990), pp. 33-53. %F A350044 a(n) = A181762(a(n-1)) for n > 1, with a(1) = 187. %e A350044 A181762(187) = 3*(187) + 5 = 566; then A181762(566) = 566/2 = 283. %t A350044 a[1] = 187; a[n_] := a[n] = If[OddQ[a[n - 1]], 3*a[n - 1] + 5, a[n - 1]/2]; Array[a, 50] (* _Amiram Eldar_, Dec 25 2021 *) %o A350044 (C++)#include <iostream> %o A350044 int main() { %o A350044 unsigned long number = 187; %o A350044 int tries = 0; %o A350044 while(number > 1 && tries++ < 50) { %o A350044 std::cout << number << ", "; %o A350044 if (number % 2 == 0) %o A350044 number /= 2; %o A350044 else %o A350044 number = number * 3 + 5; %o A350044 } %o A350044 } %o A350044 (Python) %o A350044 N, alst, f = 48, [187], lambda x: x//2 if x%2 == 0 else 3*x + 5 %o A350044 [alst.append(f(alst[-1])) for _ in range(N)] %o A350044 print(alst) # _Michael S. Branicky_, Dec 28 2021 %Y A350044 Cf. A181762, A344583. %K A350044 nonn,easy %O A350044 1,1 %A A350044 _Eduardo J. Acuña Tarazona_, Dec 22 2021