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 A375961 #30 Oct 01 2024 08:51:23 %S A375961 1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,7,1,2,1,3,1,2,1,4,1,2,1,3, %T A375961 1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,6,1,2,1,3,1,2,1,4,1,2,1,3,1,2, %U A375961 1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,9,1 %N A375961 2-adic valuation of 6*n + 2. %C A375961 6*i+2 is the first (3*x+1)/2 successor of 4*i+1, with i >= 0. %C A375961 The first occurrence of odd t is before that of t-1. %H A375961 Ruud H.G. van Tol, <a href="/A375961/b375961.txt">Table of n, a(n) for n = 0..10000</a> %H A375961 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>. %F A375961 a(n) = A007814(6*n + 2). %F A375961 a(n) = A371093(n) + 1. %F A375961 a(n) = A087229(n) - 1. %F A375961 a(n) = k for n == A096773(k) (mod 2^k), k >= 1. %F A375961 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - _Amiram Eldar_, Oct 01 2024 %e A375961 a(21) = A007814(6*21+2) = 7. %t A375961 a[n_] := IntegerExponent[6*n + 2, 2]; Array[a, 100, 0] (* _Amiram Eldar_, Sep 04 2024 *) %o A375961 (PARI) a(n) = valuation(6*n+2, 2); %o A375961 (Python) %o A375961 def A375961(n): return (~(3*n+1)&3*n).bit_length()+1 # _Chai Wah Wu_, Sep 27 2024 %Y A375961 Cf. A007814, A016933, A087229, A087230, A096773, A371093, A375782. %K A375961 nonn,easy %O A375961 0,2 %A A375961 _Ruud H.G. van Tol_, Sep 04 2024