A099246 Denominator of relative frequency of number of ones in the binary representation of n.
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
Links
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 *)