cp's OEIS Frontend

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.

A371093 a(n) is the 2-adic valuation of 3n+1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 19 2024

Keywords

Comments

When a(n) is applied to square array A257852 we obtain square array A004736, or in other words, a(n) applied to any odd number gives the index of the row where it is located in array A257852.
See further comments in A087230.
The asymptotic density of the occurrences of k = 0, 1, 2, ... is 1/2^(k+1). The asymptotic mean of this sequence is 1. - Amiram Eldar, May 28 2024

Crossrefs

Bisections: A000004, A087230.
Cf. also A371092.

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

a(n) = A007814(A016777(n)).
For all n >= 0, A067745(1+n) = A016777(n) / 2^a(n).
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