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 A359207 #70 Jul 21 2023 19:35:55 %S A359207 0,1,2,11,12,1,10,3,4,13,2,19,80,9,2,15,16,81,14,11,12,1,6,83,8,73,22, %T A359207 79,7572,5,18,75,76,7573,74,7,12,17,10,3,4,13,2,7571,4,85,78,15,96,21, %U A359207 5498,91,72,13,6,7,56,13,82,3,20,5,98,15,16,21,14,7 %N A359207 Number of steps to reach 0 starting with n in the map x->A359194(x) (binary complement of 3n), or -1 if 0 is never reached. %C A359207 It is unknown whether each positive starting integer eventually reaches 0. %C A359207 From _Jon E. Schoenfield_, Dec 21 2022: (Start) %C A359207 a(n) == n (mod 4). %C A359207 a(n) = 1 iff 3*n + 1 = 4^k for some integer k. (End) %C A359207 All but 10 values under 10^7 have been run to 0. Each of the remaining 10 requires over 2*10^12 steps. They're all in one group that reaches the same high value (nearly 8 million bits wide) after about 2*10^12 steps. The smallest value in this group is 3417582. - _Tim Peters_, Jun 14 2023 %H A359207 Rémy Sigrist, <a href="/A359207/b359207.txt">Table of n, a(n) for n = 0..10000</a> %H A359207 Tim Peters, <a href="/A359207/a359207_2.txt">Seeds under 2*10^6 that take more than 10^8 steps to reach 0</a> %H A359207 Tim Peters, <a href="/A359207/a359207_4.txt">Seeds under 10^7 that take more than 10^9 steps to reach 0</a> %H A359207 Joshua Searle, <a href="https://qedscience.wordpress.com/2021/02/19/collatz-inspired-sequences/">Collatz-inspired sequences</a>. %e A359207 a(7) = 3 because it takes 3 steps to reach 0: (7, 10, 1, 0). %t A359207 f[n_] := FromDigits[BitXor[1, IntegerDigits[3*n, 2]], 2]; Array[-1 + Length@ NestWhileList[f, #, # != 0 &] &, 68, 0] (* _Michael De Vlieger_, Dec 21 2022, faster function by _Hans Havermann_ *) %o A359207 (Python) %o A359207 def f(n): return 1 if n == 0 else (m:=3*n)^((1 << m.bit_length())-1) %o A359207 def a(n): %o A359207 i, fi = 0, n %o A359207 while fi != 0: i, fi = i+1, f(fi) %o A359207 return i %o A359207 print([a(n) for n in range(68)]) # _Michael S. Branicky_, Dec 20 2022 %o A359207 (PARI) f(n) = if(n, bitneg(n, exponent(n)+1), 1); \\ A035327 %o A359207 a(n) = my(nb=0, m=n); while (m, m=f(3*m); nb++); nb; \\ _Michel Marcus_, Dec 21 2022 %Y A359207 Cf. A035327, A359194, A359208, A359209, A359255. %K A359207 nonn,base %O A359207 0,3 %A A359207 _Joshua Searle_, Dec 20 2022