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.

A371908 a(n) = 2-adic valuation of A008336(2*n).

Original entry on oeis.org

0, 1, 3, 2, 5, 4, 2, 1, 5, 4, 2, 1, 4, 3, 1, 0, 5, 4, 2, 1, 4, 3, 1, 0, 4, 3, 1, 0, 3, 2, 0, 1, 7, 6, 4, 3, 0, 1, 3, 2, 6, 5, 3, 2, 5, 4, 2, 1, 6, 5, 3, 4, 1, 0, 2, 1, 5, 4, 2, 1, 4, 3, 1, 0, 7, 6, 4, 3, 0, 1, 3, 2, 6, 5, 3, 2, 5, 4, 2, 1, 6, 5, 3, 2, 5, 4, 2
Offset: 1

Views

Author

Michael De Vlieger, Apr 11 2024

Keywords

Comments

Aside from initial 0, first 50 terms agree with A371905: A371905(50) = 3 while a(51) = 5.

Examples

			Let b(n) = A008336(n) and let f(x) = A007814(x).
a(1) = 0 since b(2*1) = 1 and f(b(2)) = 0.
a(2) = 1 since b(2*2) = 6 and f(b(4)) = 1.
a(3) = 3 since b(2*3) = 120 and f(b(6)) = 3, etc.
		

Crossrefs

Programs

  • Mathematica
    k = 1; nn = 240; p[_] := 0; r = 0; q = Prime[k];
    {0}~Join~Reap[
        Do[If[AnyTrue[#, p[#1] < #2 & @@ # &],
            Map[p[#1] += #2 & @@ # &, #],
            Map[p[#1] -= #2 & @@ # &, #] ] &@
            Map[{PrimePi[#1], #2} & @@ # &, FactorInteger[n]];
          If[Divisible[n, q], Sow[p[k] ] ], {n, nn}] ][[-1, 1]]
  • Python
    from itertools import count, islice
    def A371908_gen(): # generator of terms
        m = 1
        for n in count(1,2):
            a, b = divmod(m,n)
            m = m*n if b else a
            yield (~m&m-1).bit_length()
            a, b = divmod(m,n+1)
            m = m*(n+1) if b else a
    A371908_list = list(islice(A371908_gen(),20)) # Chai Wah Wu, Apr 15 2024

Formula

a(n) = A007814(A008336(2*n)).