login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Maximum value of bigomega (A001222) computed for all the terms x (including the starting term x=n), when map x -> A352892(x) is iterated down to the first x <= 2, or -1 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).
6

%I #9 Apr 09 2022 14:59:47

%S 0,1,1,2,1,2,1,3,2,3,1,3,1,3,2,4,1,3,1,4,3,4,1,4,2,3,3,4,1,3,1,8,3,8,

%T 2,8,1,8,4,5,1,3,1,4,3,6,1,8,2,4,3,4,1,4,3,8,8,5,1,4,1,8,4,8,3,3,1,8,

%U 8,8,1,8,1,8,3,8,2,4,1,6,4,7,1,4,4,7,6,5,1,4,3,6,5,8,3,8,1,3,4,4,1,3,1,8,3

%N Maximum value of bigomega (A001222) computed for all the terms x (including the starting term x=n), when map x -> A352892(x) is iterated down to the first x <= 2, or -1 if such number is never reached. Here A352892 is the next odd term in the Collatz or 3x+1 map (A139391) conjugated by unary-binary-encoding (A156552).

%C Equally, maximum value of bigomega (A001222) computed for all the terms x (including the starting term x=n), when map x -> A341515(x) is iterated starting from x=n.

%H Antti Karttunen, <a href="/A352897/b352897.txt">Table of n, a(n) for n = 1..16384</a>

%H Antti Karttunen, <a href="/A352897/a352897.txt">Data supplement: n, a(n) computed for n = 1..65537</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(n) = max(A001222(n), A352896(n)).

%F For n > 1, a(n) = A333860(A156552(n)).

%o (PARI) A352897(n) = { my(m=bigomega(n)); while(n>2, m = max(m,bigomega(n)); n = A352892(n)); (m); }; \\ Uses the code from A352892.

%o (PARI) A352897(n) = { my(m=bigomega(n)); while(n>2, m = max(m,bigomega(n)); n = A341515(n)); (m); }; \\ Slightly slower.

%o (PARI)

%o A139391(n) = my(x = if(n%2, 3*n+1, n/2)); x/2^valuation(x, 2); \\ From A139391

%o 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 A333860(n) = { my(mw=1); while(n>1, mw = max(hammingweight(n),mw); n = A139391(n)); (mw); };

%o A352897(n) = if(1==n,0,A333860(A156552(n)));

%Y Cf. A001222, A156552, A333860, A341515, A352892, A352896, A352898.

%K nonn

%O 1,4

%A _Antti Karttunen_, Apr 08 2022