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 A372475 #11 Aug 03 2024 01:52:44 %S A372475 1,2,2,3,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6, %T A372475 6,6,6,6,6,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, %U A372475 7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8 %N A372475 Length of binary expansion (or number of bits) of the n-th squarefree number. %F A372475 a(n) = A070939(A005117(n)). %F A372475 a(n) = A372472(n) + A372433(n). %e A372475 The 10th squarefree number is 14, with binary expansion (1,1,1,0), so a(10) = 4. %t A372475 IntegerLength[Select[Range[1000],SquareFreeQ],2] %o A372475 (Python) %o A372475 from math import isqrt %o A372475 from sympy import mobius %o A372475 def A372475(n): %o A372475 def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) %o A372475 m, k = n, f(n) %o A372475 while m != k: %o A372475 m, k = k, f(k) %o A372475 return int(m).bit_length() # _Chai Wah Wu_, Aug 02 2024 %Y A372475 For prime instead of squarefree we have A035100, 1's A014499, 0's A035103. %Y A372475 Restriction of A070939 to A005117. %Y A372475 Run-lengths are A077643. %Y A372475 For weight instead of length we have A372433 (restrict A000120 to A005117). %Y A372475 For zeros instead of length we have A372472, firsts A372473. %Y A372475 Positions of first appearances are A372540. %Y A372475 A030190 gives binary expansion, reversed A030308. %Y A372475 A048793 lists positions of ones in reversed binary expansion, sum A029931. %Y A372475 A371571 lists positions of zeros in binary expansion, sum A359359. %Y A372475 A371572 lists positions of ones in binary expansion, sum A230877. %Y A372475 A372515 lists positions of zeros in reversed binary expansion, sum A359400. %Y A372475 Cf. A003714, A023416, A049093, A049094, A059015, A069010, A073642, A145037, A211997, A368494, A372474, A372516. %K A372475 nonn,base %O A372475 1,2 %A A372475 _Gus Wiseman_, May 09 2024