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 A380244 #24 Jan 18 2025 19:49:37 %S A380244 1,10,12,68,45,30,72,101,134,179,237,314,422,551,723,509,1282,887, %T A380244 1170,1535,2021,1509,1899,2412,1780,2217,3170,3867,2819,3728,2511, %U A380244 3155,3972,2802,3578,2623,3444,4302,3087,3968,2690,1806,2336,1593,2084,2757,1884,2477 %N A380244 The Collatz (or 3x+1) trajectory starting at a(n) contains exactly n odd integers and a(n) is the n-th number with this property. %H A380244 Alois P. Heinz, <a href="/A380244/b380244.txt">Table of n, a(n) for n = 1..235</a> %H A380244 Wikipedia, <a href="https://en.wikipedia.org/wiki/Collatz_conjecture">Collatz Conjecture</a> %H A380244 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %F A380244 A078719(a(n)) = n. %e A380244 a(2) = 10 is the second integer (after 5) having exactly two odd integers in the Collatz trajectory: 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1. %p A380244 b:= proc(n) option remember; irem(n, 2, 'r')+ %p A380244 `if`(n=1, 0, b(`if`(n::odd, 3*n+1, r))) %p A380244 end: %p A380244 A:= proc() local h, p, q; p, q:= proc() [] end, 0; %p A380244 proc(n, k) %p A380244 if k=1 then return 2^(n-1) fi; %p A380244 while nops(p(k))<n do q:= q+1; %p A380244 h:= b(q); %p A380244 p(h):= [p(h)[], q] %p A380244 od; p(k)[n] %p A380244 end %p A380244 end(): %p A380244 a:= n-> A(n$2): %p A380244 seq(a(n), n=1..48); %Y A380244 Main diagonal of A354236. %Y A380244 Cf. A006577, A006667, A078719, A337144. %K A380244 nonn %O A380244 1,2 %A A380244 _Alois P. Heinz_, Jan 17 2025