OFFSET
1,1
COMMENTS
[At present it is only a conjecture that the runs have even length, but the proof should not be difficult.]
EXAMPLE
A376201 begins 1, 2, 3, 4, 11, 12, 27, 28, 59, 60, 123, 124, 125, 126, 255, ...
The runs have lengths 4,2,2,4,... so the present sequence begins 2,1,1,2,...
PROG
(Python)
from itertools import count, islice
from sympy import isprime, nextprime
def A376758_gen(): # generator of terms
c, a, p, q = 2, 2, 3, 4
for n in count(3):
b = min(p, q) if isprime(a) else (p if a == (p<<1) else q)
if b == n:
if b == a+1:
c += 1
else:
yield c>>1
c = 1
if b == p:
p = nextprime(p)
else:
q += isprime(q+1)+1
a = b
CROSSREFS
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, Oct 07 2024
EXTENSIONS
a(33)-a(35) from Michael S. Branicky, Oct 08 2024
a(36)-a(38) from Michael S. Branicky, Oct 15 2024
STATUS
approved