login
A375961
2-adic valuation of 6*n + 2.
1
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, 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, 1, 5, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 9, 1
OFFSET
0,2
COMMENTS
6*i+2 is the first (3*x+1)/2 successor of 4*i+1, with i >= 0.
The first occurrence of odd t is before that of t-1.
FORMULA
a(n) = A007814(6*n + 2).
a(n) = A371093(n) + 1.
a(n) = A087229(n) - 1.
a(n) = k for n == A096773(k) (mod 2^k), k >= 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - Amiram Eldar, Oct 01 2024
EXAMPLE
a(21) = A007814(6*21+2) = 7.
MATHEMATICA
a[n_] := IntegerExponent[6*n + 2, 2]; Array[a, 100, 0] (* Amiram Eldar, Sep 04 2024 *)
PROG
(PARI) a(n) = valuation(6*n+2, 2);
(Python)
def A375961(n): return (~(3*n+1)&3*n).bit_length()+1 # Chai Wah Wu, Sep 27 2024
KEYWORD
nonn,easy
AUTHOR
Ruud H.G. van Tol, Sep 04 2024
STATUS
approved