A372473 Least k such that the k-th squarefree number has exactly n zeros in its binary expansion.
1, 2, 7, 12, 21, 40, 79, 158, 315, 1247, 1246, 2492, 4983, 9963, 19921, 39845, 79689, 159361, 318726, 637462, 1274919, 2549835, 5099651, 10199302, 20398665, 40797328, 81594627, 163189198, 326378285, 652756723, 1305513584, 2611027095, 5222054082, 10444108052
Offset: 0
Examples
The squarefree numbers A005117(a(n)) together with their binary expansions and binary indices begin: 1: 1 ~ {1} 2: 10 ~ {2} 10: 1010 ~ {2,4} 17: 10001 ~ {1,5} 33: 100001 ~ {1,6} 65: 1000001 ~ {1,7} 129: 10000001 ~ {1,8} 257: 100000001 ~ {1,9} 514: 1000000010 ~ {2,10} 2051: 100000000011 ~ {1,2,12} 2049: 100000000001 ~ {1,12} 4097: 1000000000001 ~ {1,13} 8193: 10000000000001 ~ {1,14}
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..57
Crossrefs
Programs
-
Mathematica
nn=10000; spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&]; dcs=DigitCount[Select[Range[nn],SquareFreeQ],2,0]; Table[Position[dcs,i][[1,1]],{i,0,spnm[dcs]}]
-
Python
from math import isqrt from itertools import count from sympy import factorint, mobius from sympy.utilities.iterables import multiset_permutations def A372473(n): if n==0: return 1 for l in count(n): m = 1<
Chai Wah Wu, May 10 2024
Extensions
a(23)-a(33) from Chai Wah Wu, May 10 2024
Comments