login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354765 a(n) is a binary encoded version of A355057(n). 4
0, 0, 1, 3, 6, 7, 13, 15, 27, 59, 122, 123, 243, 499, 501, 511, 1007, 2031, 4047, 8143, 16271, 32655, 65422, 65423, 130831, 261903, 523791, 1048079, 2096651, 2096671, 4193813, 4193815, 4193311, 8387615, 16775199, 33552415, 67104799, 134213663, 268427295, 536862751, 1073725471, 2147467295, 4294934559, 8589901855, 17179803679 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
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.
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}.
LINKS
EXAMPLE
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.
MAPLE
# To get first M terms:
with(numtheory);
M:=20; ans:=[0, 0, 1];
for i from 4 to M do
S:={}; j1:=floor((i+1)/2); j2:=i-1;
for j from j1 to j2 do S:={op(S), op(factorset(b252[j]))} od:
plis:=sort(convert(S, list));
t3:=0; for ii from 1 to nops(plis) do p:=plis[ii]; p2:=pi(p); t3:=t3+2^(p2-1); od:
ans:=[op(ans), t3];
od:
ans;
PROG
(Python)
from math import gcd, lcm
from itertools import count, islice
from collections import deque
from sympy import primepi, primefactors
def A354765_gen(): # generator of terms
aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
yield 0
while True:
for m in count(c):
if m not in aset and gcd(m, b) == 1:
yield sum(2**(primepi(p)-1) for p in primefactors(b))
aset.add(m)
aqueue.append(m)
if f: aqueue.popleft()
b = lcm(*aqueue)
f = not f
while c in aset:
c += 1
break
A354765_list = list(islice(A354765_gen(), 20)) # Chai Wah Wu, Jun 18 2022
CROSSREFS
Sequence in context: A137595 A033053 A248388 * A107850 A216514 A051218
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)