OFFSET
0,2
COMMENTS
Note that the data is not strictly increasing.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..57
EXAMPLE
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}
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]}]
PROG
(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<<l
for d in multiset_permutations('0'*n+'1'*(l-n)):
k = m+int('0'+''.join(d), 2)
if max(factorint(k).values(), default=0)==1:
return sum(mobius(a)*(k//a**2) for a in range(1, isqrt(k)+1)) # Chai Wah Wu, May 10 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, May 09 2024
EXTENSIONS
a(23)-a(33) from Chai Wah Wu, May 10 2024
STATUS
approved