This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A354765 #30 Jun 19 2022 06:23:42 %S A354765 0,0,1,3,6,7,13,15,27,59,122,123,243,499,501,511,1007,2031,4047,8143, %T A354765 16271,32655,65422,65423,130831,261903,523791,1048079,2096651,2096671, %U A354765 4193813,4193815,4193311,8387615,16775199,33552415,67104799,134213663,268427295,536862751,1073725471,2147467295,4294934559,8589901855,17179803679 %N A354765 a(n) is a binary encoded version of A355057(n). %C A354765 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 A354765 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 A354765 N. J. A. Sloane, <a href="/A354765/b354765.txt">Table of n, a(n) for n = 1..1000</a> %e A354765 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 A354765 # To get first M terms: %p A354765 with(numtheory); %p A354765 M:=20; ans:=[0,0,1]; %p A354765 for i from 4 to M do %p A354765 S:={}; j1:=floor((i+1)/2); j2:=i-1; %p A354765 for j from j1 to j2 do S:={op(S), op(factorset(b252[j]))} od: %p A354765 plis:=sort(convert(S,list)); %p A354765 t3:=0; for ii from 1 to nops(plis) do p:=plis[ii]; p2:=pi(p); t3:=t3+2^(p2-1); od: %p A354765 ans:=[op(ans),t3]; %p A354765 od: %p A354765 ans; %o A354765 (Python) %o A354765 from math import gcd, lcm %o A354765 from itertools import count, islice %o A354765 from collections import deque %o A354765 from sympy import primepi, primefactors %o A354765 def A354765_gen(): # generator of terms %o A354765 aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True %o A354765 yield 0 %o A354765 while True: %o A354765 for m in count(c): %o A354765 if m not in aset and gcd(m,b) == 1: %o A354765 yield sum(2**(primepi(p)-1) for p in primefactors(b)) %o A354765 aset.add(m) %o A354765 aqueue.append(m) %o A354765 if f: aqueue.popleft() %o A354765 b = lcm(*aqueue) %o A354765 f = not f %o A354765 while c in aset: %o A354765 c += 1 %o A354765 break %o A354765 A354765_list = list(islice(A354765_gen(),20)) # _Chai Wah Wu_, Jun 18 2022 %Y A354765 Cf. A090252, A355057. %K A354765 nonn,base %O A354765 1,4 %A A354765 _Michael De Vlieger_ and _N. J. A. Sloane_, Jun 18 2022