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.
%I A099245 #18 Apr 05 2025 09:11:14 %S A099245 0,1,1,1,1,2,2,1,1,1,1,3,1,3,3,1,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,1,1,1, %T A099245 1,1,1,1,1,2,1,1,1,2,1,2,2,5,1,1,1,2,1,2,2,5,1,2,2,5,2,5,5,1,1,2,2,3, %U A099245 2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3 %N A099245 Numerator of relative frequency of number of ones in the binary representation of n. %H A099245 Reinhard Zumkeller, <a href="/A099245/b099245.txt">Table of n, a(n) for n = 0..10000</a> %H A099245 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>. %F A099245 a(n)*A070939(n) = A099246(n)*A000120(n). %F A099245 a(n) = A000120(n)/A099244(n) for n > 0. %F A099245 a(n) = if n=0 then 0 else A000120(n)/GCD(A070939(n), A000120(n)). %e A099245 Fractions begin with 0, 1, 1/2, 1, 1/3, 2/3, 2/3, 1, 1/4, 1/2, 1/2, 3/4, ... %t A099245 a[n_] := Numerator[First[#]/Total[#]] & @ DigitCount[n, 2, {1, 0}]; Array[a, 100, 0] (* _Amiram Eldar_, Apr 05 2025 *) %o A099245 (Haskell) %o A099245 import Data.Ratio ((%), numerator) %o A099245 a099245 n = numerator $ (a000120 n) % (a070939 n) %o A099245 -- _Reinhard Zumkeller_, Oct 10 2013 %Y A099245 Cf. A000120, A007088, A070939, A099244, A099246 (denominators). %K A099245 nonn,frac,base %O A099245 0,6 %A A099245 _Reinhard Zumkeller_, Oct 08 2004