A371093 a(n) is the 2-adic valuation of 3n+1.
0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2
Offset: 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65537
Crossrefs
Programs
-
Mathematica
Table[IntegerExponent[3*n+1, 2], {n, 0, 105}] (* James C. McMahon, Apr 21 2024 *)
-
PARI
A371093(n) = valuation(1+3*n,2);
-
Python
def A371093(n): return ((m:=3*n) & ~(m+1)).bit_length() # Chai Wah Wu, Apr 20 2024
Formula
G.f.: Sum_{k>=1} k*x^(-1/3 + (-2)^(k + 1)/3 + 2^k)/(1 - x^(2^(k + 1))). - Miles Wilson, Sep 30 2024
Comments