%I #30 Jun 19 2022 06:23:42
%S 0,0,1,3,6,7,13,15,27,59,122,123,243,499,501,511,1007,2031,4047,8143,
%T 16271,32655,65422,65423,130831,261903,523791,1048079,2096651,2096671,
%U 4193813,4193815,4193311,8387615,16775199,33552415,67104799,134213663,268427295,536862751,1073725471,2147467295,4294934559,8589901855,17179803679
%N a(n) is a binary encoded version of A355057(n).
%C Let plist = list of forbidden primes for A090252(n); A355057(n) is the product of these primes. Then a(n) = Sum of 2^(i-1) over all prime(i) in plist.
%C Conversely, if a(n) has binary expansion a(n) = Sum b(i)*2^i, b(i) = 0 or 1, then plist consists of {prime(i+1) such that b(i) = 1}.
%H N. J. A. Sloane, <a href="/A354765/b354765.txt">Table of n, a(n) for n = 1..1000</a>
%e For n = 7 the forbidden primes are 2, 5, 7 = prime(1), prime(3) and prime(4). Their product is A355057(7) = 70. Then a(7) = 2^0 + 2^2 + 2^3 = 13.
%p # To get first M terms:
%p with(numtheory);
%p M:=20; ans:=[0,0,1];
%p for i from 4 to M do
%p S:={}; j1:=floor((i+1)/2); j2:=i-1;
%p for j from j1 to j2 do S:={op(S), op(factorset(b252[j]))} od:
%p plis:=sort(convert(S,list));
%p t3:=0; for ii from 1 to nops(plis) do p:=plis[ii]; p2:=pi(p); t3:=t3+2^(p2-1); od:
%p ans:=[op(ans),t3];
%p od:
%p ans;
%o (Python)
%o from math import gcd, lcm
%o from itertools import count, islice
%o from collections import deque
%o from sympy import primepi, primefactors
%o def A354765_gen(): # generator of terms
%o aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
%o yield 0
%o while True:
%o for m in count(c):
%o if m not in aset and gcd(m,b) == 1:
%o yield sum(2**(primepi(p)-1) for p in primefactors(b))
%o aset.add(m)
%o aqueue.append(m)
%o if f: aqueue.popleft()
%o b = lcm(*aqueue)
%o f = not f
%o while c in aset:
%o c += 1
%o break
%o A354765_list = list(islice(A354765_gen(),20)) # _Chai Wah Wu_, Jun 18 2022
%Y Cf. A090252, A355057.
%K nonn,base
%O 1,4
%A _Michael De Vlieger_ and _N. J. A. Sloane_, Jun 18 2022