A368533 Numbers whose binary indices are all squarefree.
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, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 80, 81, 82, 83, 84, 85, 86, 87, 96, 97, 98, 99, 100, 101, 102, 103, 112, 113, 114, 115, 116, 117, 118, 119, 512
Offset: 1
Examples
The terms together with their binary expansions and binary indices begin: 0: 0 ~ {} 1: 1 ~ {1} 2: 10 ~ {2} 3: 11 ~ {1,2} 4: 100 ~ {3} 5: 101 ~ {1,3} 6: 110 ~ {2,3} 7: 111 ~ {1,2,3} 16: 10000 ~ {5} 17: 10001 ~ {1,5} 18: 10010 ~ {2,5} 19: 10011 ~ {1,2,5} 20: 10100 ~ {3,5} 21: 10101 ~ {1,3,5} 22: 10110 ~ {2,3,5} 23: 10111 ~ {1,2,3,5} 32: 100000 ~ {6} 33: 100001 ~ {1,6} 34: 100010 ~ {2,6} 35: 100011 ~ {1,2,6} 36: 100100 ~ {3,6} 37: 100101 ~ {1,3,6} 38: 100110 ~ {2,3,6}
Crossrefs
For prime indices instead of binary indices we have A302478.
The case of prime binary indices is A326782.
The case of squarefree product is A371289.
For prime-power product we have A371290.
A005117 lists squarefree numbers.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
Programs
-
Mathematica
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1]; Select[Range[0,100],And@@SquareFreeQ/@bpe[#]&]
-
Python
from math import isqrt from sympy import mobius def A368533(n): def f(x,n): return int(n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))) def A005117(n): m, k = n, f(n,n) while m != k: m, k = k, f(k,n) return m 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
Comments