|
|
A372540
|
|
Least k such that the k-th squarefree number has binary expansion of length n. Index of the smallest squarefree number >= 2^n.
|
|
16
|
|
|
1, 2, 4, 7, 12, 21, 40, 79, 158, 315, 625, 1246, 2492, 4983, 9963, 19921, 39845, 79689, 159361, 318726, 637462, 1274919, 2549835, 5099651, 10199302, 20398665, 40797328, 81594627, 163189198, 326378285, 652756723, 1305513584, 2611027095, 5222054082, 10444108052
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The squarefree numbers A005117(a(n)) together with their binary expansions and binary indices begin:
1: 1 ~ {1}
2: 10 ~ {2}
5: 101 ~ {1,3}
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}
1027: 10000000011 ~ {1,2,11}
2049: 100000000001 ~ {1,12}
4097: 1000000000001 ~ {1,13}
8193: 10000000000001 ~ {1,14}
16385: 100000000000001 ~ {1,15}
32770: 1000000000000010 ~ {2,16}
65537: 10000000000000001 ~ {1,17}
131073: 100000000000000001 ~ {1,18}
|
|
MATHEMATICA
|
nn=1000;
ssnm[y_]:=Max@@NestWhile[Most, y, Union[#]!=Range[Max@@#]&];
dcs=IntegerLength[Select[Range[nn], SquareFreeQ], 2];
Table[Position[dcs, i][[1, 1]], {i, ssnm[dcs]}]
|
|
PROG
|
(Python)
from itertools import count
from math import isqrt
from sympy import mobius, factorint
def A372540(n): return next(sum(mobius(a)*(k//a**2) for a in range(1, isqrt(k)+1)) for k in count(1<<n) if max(factorint(k).values(), default=0)==1) if n else 1 # Chai Wah Wu, May 12 2024
|
|
CROSSREFS
|
For prime instead of squarefree we have:
Indices of the squarefree numbers listed by A372683.
A000120 counts ones in binary expansion (binary weight), zeros A080791.
A070939 counts bits, binary length, or length of binary expansion.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|