OFFSET
1,3
LINKS
MathOverflow, Are there primes of every Hamming weight?
Wikipedia, Hamming weight.
MATHEMATICA
DigitCount[Select[Range[100], SquareFreeQ], 2, 1]
PROG
(Python)
from math import isqrt
from sympy import mobius
def A372433(n):
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return int(m).bit_count() # Chai Wah Wu, Aug 02 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, May 04 2024
STATUS
approved