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 A119920 #3 Jun 30 2025 20:01:34 %S A119920 1,4,24,96,480,1728,8064,30720,129024,506880,2095104,8232960,33546240, %T A119920 133152768,536248320,2139095040,8589803520,34285289472,137438429184, %U A119920 549212651520,2198882746368,8791793860608,35184363700224 %N A119920 Number of rationals in [0, 1) having exactly n preperiodic bits, then exactly n periodic bits. %F A119920 a(n) = 2^(n-1) * sum_{d|n} (2^d - 1) * mu(n/d) %e A119920 The binary expansion of 7/24 = 0.010(01)... has 3 preperiodic bits (to the right of the binary point) followed by 2 periodic (i.e., repeating) bits, while 1/2 = 0.1(0)... has one bit of each type. The preperiodic and periodic parts are both chosen to be as short as possible. %e A119920 a(2) = |{1/12 = 0.00(01)..., 5/12 = 0.01(10)..., 7/12 = 0.10(01)..., 11/12 = 0.11(10)...}| = 4 %t A119920 Table[2^(n-1)(Plus@@((2^Divisors[n]-1)MoebiusMu[n/Divisors[n]])),{n,1,23} ] %Y A119920 Elementwise product of 2^n (offset 0) and A038199. Also, diagonal of A119918. %K A119920 nonn,base,easy %O A119920 1,2 %A A119920 Brad Chalfan (brad(AT)chalfan.net), May 28 2006