login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers whose binary indices are all squarefree semiprimes.
4

%I #14 Aug 16 2024 20:48:16

%S 32,512,544,8192,8224,8704,8736,16384,16416,16896,16928,24576,24608,

%T 25088,25120,1048576,1048608,1049088,1049120,1056768,1056800,1057280,

%U 1057312,1064960,1064992,1065472,1065504,1073152,1073184,1073664,1073696,2097152,2097184

%N Numbers whose binary indices are all squarefree semiprimes.

%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 32: 100000 ~ {6}

%e 512: 1000000000 ~ {10}

%e 544: 1000100000 ~ {6,10}

%e 8192: 10000000000000 ~ {14}

%e 8224: 10000000100000 ~ {6,14}

%e 8704: 10001000000000 ~ {10,14}

%e 8736: 10001000100000 ~ {6,10,14}

%e 16384: 100000000000000 ~ {15}

%e 16416: 100000000100000 ~ {6,15}

%e 16896: 100001000000000 ~ {10,15}

%e 16928: 100001000100000 ~ {6,10,15}

%e 24576: 110000000000000 ~ {14,15}

%e 24608: 110000000100000 ~ {6,14,15}

%e 25088: 110001000000000 ~ {10,14,15}

%e 25120: 110001000100000 ~ {6,10,14,15}

%e 1048576: 100000000000000000000 ~ {21}

%p M:= 26: # for terms < 2^M

%p P:= select(isprime, [$2..(M+1)/2]): nP:= nops(P):

%p S:= select(`<`,{seq(seq(P[i]*P[j],i=1..j-1),j=1..nP)},M+1):

%p R:= map(proc(s) local i; add(2^(i-1),i=s) end proc, combinat:-powerset(S) minus {{}}):

%p sort(convert(R,list)); # _Robert Israel_, Apr 04 2024

%t bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];

%t sqfsemi[n_]:=SquareFreeQ[n]&&PrimeOmega[n]==2;

%t Select[Range[10000],And@@sqfsemi/@bix[#]&]

%o (Python)

%o def A371453(n): return sum(1<<A006881(i)-1 for i, j in enumerate(bin(n)[:1:-1],1) if j=='1')

%o (Python)

%o from math import isqrt

%o from sympy import primepi, primerange

%o def A371453(n):

%o def f(x,n): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))

%o def A006881(n):

%o m, k = n, f(n,n)

%o while m != k:

%o m, k = k, f(k,n)

%o return m

%o return sum(1<<A006881(i)-1 for i, j in enumerate(bin(n)[:1:-1],1) if j=='1') # _Chai Wah Wu_, Aug 16 2024

%Y Partitions of this type are counted by A002100, squarefree case of A101048.

%Y For primes instead of squarefree semiprimes we get A326782.

%Y For prime indices instead of binary indices we have A339113, A339112.

%Y Allowing any squarefree numbers gives A368533.

%Y This is the squarefree case of A371454.

%Y A001358 lists squarefree semiprimes, squarefree A006881.

%Y A005117 lists squarefree numbers.

%Y A048793 lists binary indices, reverse A272020, length A000120, sum A029931.

%Y A070939 gives length of binary expansion.

%Y A096111 gives product of binary indices.

%Y Cf. A087086, A112798, A296119, A302478, A326031, A367905, A368109, A371450.

%K nonn,base

%O 1,1

%A _Gus Wiseman_, Apr 02 2024