%I #16 Oct 24 2024 16:17:34
%S 0,1,2,3,4,5,6,7,16,17,18,19,20,21,22,23,32,33,34,35,36,37,38,39,48,
%T 49,50,51,52,53,54,55,64,65,66,67,68,69,70,71,80,81,82,83,84,85,86,87,
%U 96,97,98,99,100,101,102,103,112,113,114,115,116,117,118,119,512
%N Numbers whose binary indices are all squarefree.
%C The complement first differs from A115419 in having 128.
%C A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
%e The terms together with their binary expansions and binary indices begin:
%e 0: 0 ~ {}
%e 1: 1 ~ {1}
%e 2: 10 ~ {2}
%e 3: 11 ~ {1,2}
%e 4: 100 ~ {3}
%e 5: 101 ~ {1,3}
%e 6: 110 ~ {2,3}
%e 7: 111 ~ {1,2,3}
%e 16: 10000 ~ {5}
%e 17: 10001 ~ {1,5}
%e 18: 10010 ~ {2,5}
%e 19: 10011 ~ {1,2,5}
%e 20: 10100 ~ {3,5}
%e 21: 10101 ~ {1,3,5}
%e 22: 10110 ~ {2,3,5}
%e 23: 10111 ~ {1,2,3,5}
%e 32: 100000 ~ {6}
%e 33: 100001 ~ {1,6}
%e 34: 100010 ~ {2,6}
%e 35: 100011 ~ {1,2,6}
%e 36: 100100 ~ {3,6}
%e 37: 100101 ~ {1,3,6}
%e 38: 100110 ~ {2,3,6}
%t bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
%t Select[Range[0,100],And@@SquareFreeQ/@bpe[#]&]
%o (Python)
%o from math import isqrt
%o from sympy import mobius
%o def A368533(n):
%o def f(x,n): return int(n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))
%o def A005117(n):
%o m, k = n, f(n,n)
%o while m != k: m, k = k, f(k,n)
%o return m
%o return sum(1<<A005117(i)-1 for i, j in enumerate(bin(n-1)[:1:-1],1) if j=='1') # _Chai Wah Wu_, Oct 24 2024
%Y Set multipartitions: A049311, A050320, A089259, A116540.
%Y For prime indices instead of binary indices we have A302478.
%Y The case of prime binary indices is A326782.
%Y The case of squarefree product is A371289.
%Y For prime-power product we have A371290.
%Y For nonprime binary indices we have A371443, composite A371444.
%Y The semiprime case is A371453, squarefree case of A371454.
%Y A005117 lists squarefree numbers.
%Y A048793 lists binary indices, A000120 length, A272020 reverse, A029931 sum.
%Y A070939 gives length of binary expansion.
%Y A096111 gives product of binary indices.
%Y Cf. A000040, A001222, A087086, A296119, A326031, A367905, A368109, A371450.
%K nonn,base
%O 1,3
%A _Gus Wiseman_, Mar 23 2024