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.

Showing 1-1 of 1 results.

A386261 a(n) = A001511(A001511(n)), where A001511 is the ruler function.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Jul 17 2025

Keywords

Comments

The first occurrence of k = 1, 2, ... is at n = 2^(2^(k-1) - 1) = A058891(k).
The asymptotic density of the occurrences of k = 1, 2, ... in this sequence is 2^(2^(k-1))/(2^(2^k)-1) = 2/3, 4/15, 16/255, 256/65535, 65536/4294967295, ...

Crossrefs

Programs

  • Mathematica
    f[n_] := IntegerExponent[n, 2] + 1; a[n_] := f[f[n]]; Array[a, 100]
  • PARI
    a(n) = valuation(valuation(n, 2) + 1, 2) + 1;

Formula

a(n) >= 1, with equality if and only if n is in A003159.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{m>=0} 1/(2^(2^m) - 1) = 1.4039368... (A048649).
Showing 1-1 of 1 results.