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.

A099246 Denominator of relative frequency of number of ones in the binary representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 08 2004

Keywords

Crossrefs

Cf. A000120, A000225, A007088, A070939, A099244, A099245 (numerators).

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    a099246 n = denominator $ (a000120 n) % (a070939 n)
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    a[n_] := Denominator[First[#]/Total[#]] & @ DigitCount[n, 2, {1, 0}]; Array[a, 100, 0] (* Amiram Eldar, Apr 05 2025 *)

Formula

a(n)*A000120(n) = A099245(n)*A070939(n).
a(n) = A070939(n)/A099244(n) for n > 0.
a(n) = 1 iff n = A000225(k).
a(n) = if n=0 then 1 else A070939(n)/GCD(A070939(n), A000120(n)).