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 A352890 #14 Apr 08 2022 22:39:19 %S A352890 0,0,1,7,2,5,3,16,8,19,4,14,5,12,6,17,6,9,7,20,20,26,8,15,9,27,17,13, %T A352890 9,7,10,106,13,121,7,111,11,122,27,34,12,21,13,27,15,35,14,104,10,23, %U A352890 28,28,15,18,21,102,122,36,16,29,17,156,21,107,14,14,18,122,123,109,19,112,20,113,10,123,8,28,21,35 %N A352890 Number of iterations of map x -> A341515(x) needed to reach x <= 2 when starting from x=n, or -1 if such number is never reached. Here A341515 is the Collatz or 3x+1 map (A006370) conjugated by unary-binary-encoding (A156552). %C A352890 The unbroken ray in the scatter plot corresponds to primes. %H A352890 Antti Karttunen, <a href="/A352890/b352890.txt">Table of n, a(n) for n = 1..25005</a> %H A352890 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %H A352890 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %F A352890 If n <= 2, a(n) = 0, otherwise a(n) = 1 + a(A341515(n)). %F A352890 For n > 1, a(n) = A006577(A156552(n)). %F A352890 For n >= 1, a(A000040(n)) = n-1. %F A352890 For n >= 1, a(n) >= A352891(n). %F A352890 For n >= 1, a(n) >= A352893(n). %o A352890 (PARI) %o A352890 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A352890 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A352890 A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res }; %o A352890 A329603(n) = A005940(2+(3*A156552(n))); %o A352890 A341515(n) = if(n%2, A064989(n), A329603(n)); %o A352890 A352890(n) = { my(k=0); while(n>2, n = A341515(n); k++); (k); }; %Y A352890 Cf. A000040, A005940, A006577, A064989, A156552, A329603, A341515. %Y A352890 Cf. also A352891, A352892, A352893, A352894. %K A352890 nonn,look %O A352890 1,4 %A A352890 _Antti Karttunen_, Apr 08 2022