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 A337349 #19 Aug 27 2020 21:26:13 %S A337349 1,1,5,7,19,1,7,1,37,5,23,25,55,7,1,17,73,19,41,43,91,1,25,13,109,7, %T A337349 59,61,127,1,17,35,145,37,77,79,163,5,43,11,181,23,95,97,199,25,13,53, %U A337349 217,55,113,115,235,7,61,31,253,1,131,133,271,17,35,71,289,73,149 %N A337349 To get a(n), take 3*n+1 and divide out any power of 2; then multiply by 3, subtract 1 and divide out any power of 2. %C A337349 When a(x) is iterated, what are the limit cycles? Are there any besides (1) and (17 -> 19 -> 43 -> 97 -> 109 -> 61)? %C A337349 Up to 1000000000 every number eventually reaches one of those two cycles. In this range, the longest trajectory starts with n=458788881 and takes 193 steps to reach 1. - Christian Boyer (cboyer(AT)club-internet.fr), Sep 16 2006 %H A337349 Hugo Pfoertner, <a href="/A337349/b337349.txt">Table of n, a(n) for n = 0..10000</a> %F A337349 a(n) = A075677(A067745(n+1)). %F A337349 a(2*n+1) = A102421(n). %p A337349 A337349 := proc(n) %p A337349 local a; %p A337349 a := 3*n+1; %p A337349 while modp(a,2) = 0 do %p A337349 a := a/2 ; %p A337349 end do: %p A337349 a := 3*a-1 ; %p A337349 while modp(a,2) = 0 do %p A337349 a := a/2 ; %p A337349 end do: %p A337349 a ; %p A337349 end proc: # _R. J. Mathar_, Aug 24 2020 %t A337349 a[n_] := Module[{k = 3n+1}, k = k/2^IntegerExponent[k, 2]; k = 3k-1; k = k/2^IntegerExponent[k, 2]; k]; %t A337349 a /@ Range[0, 100] (* _Jean-François Alcover_, Aug 27 2020 *) %Y A337349 Cf. A102421 (bisection), A102423. %K A337349 nonn,easy %O A337349 0,3 %A A337349 _N. J. A. Sloane_, based on email from Dan Asimov (dasimov(AT)earthlink.net), Sep 15 2006