Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A371454
Numbers whose binary indices are all semiprimes.
3
8, 32, 40, 256, 264, 288, 296, 512, 520, 544, 552, 768, 776, 800, 808, 8192, 8200, 8224, 8232, 8448, 8456, 8480, 8488, 8704, 8712, 8736, 8744, 8960, 8968, 8992, 9000, 16384, 16392, 16416, 16424, 16640, 16648, 16672, 16680, 16896, 16904, 16928, 16936, 17152
OFFSET
1,1
COMMENTS
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.
EXAMPLE
The terms together with their binary expansions and binary indices begin:
8: 1000 ~ {4}
32: 100000 ~ {6}
40: 101000 ~ {4,6}
256: 100000000 ~ {9}
264: 100001000 ~ {4,9}
288: 100100000 ~ {6,9}
296: 100101000 ~ {4,6,9}
512: 1000000000 ~ {10}
520: 1000001000 ~ {4,10}
544: 1000100000 ~ {6,10}
552: 1000101000 ~ {4,6,10}
768: 1100000000 ~ {9,10}
776: 1100001000 ~ {4,9,10}
800: 1100100000 ~ {6,9,10}
808: 1100101000 ~ {4,6,9,10}
MATHEMATICA
bix[n_]:=Join@@Position[Reverse[IntegerDigits[n, 2]], 1];
semi[n_]:=PrimeOmega[n]==2;
Select[Range[10000], And@@semi/@bix[#]&]
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange
def A371454(n):
def f(x, n): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
def A001358(n):
m, k = n, f(n, n)
while m != k:
m, k = k, f(k, n)
return m
return sum(1<<A001358(i)-1 for i, j in enumerate(bin(n)[:1:-1], 1) if j=='1') # Chai Wah Wu, Aug 16 2024
CROSSREFS
Partitions of this type are counted by A101048, squarefree case A002100.
For primes instead of semiprimes we get A326782.
For prime indices instead of binary indices we have A339112, A339113.
The squarefree case is A371453.
A001358 lists semiprimes, squarefree A006881.
A005117 lists squarefree numbers.
A048793 lists binary indices, reverse A272020, length A000120, sum A029931.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
Sequence in context: A144096 A371444 A127988 * A129749 A005879 A067519
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, Apr 02 2024
STATUS
approved