Original entry on oeis.org
0, 1, 0, 1, 6, 1, 6, 15, 24, 29, 22, 1, 0, 7, 6, 11, 48, 109, 0, 7, 66, 155, 54, 21, 16, 11
Offset: 1
-
from itertools import count, islice
from sympy import nextprime
def A366868_gen(): # generator of terms
a, aset, p = 1, {0,1}, 2
for i in count(3):
for b in count(a,p):
if b not in aset:
aset.add(b)
c = b%(p:=nextprime(p))
if c > a:
yield a
a = c
break
A366868_list = list(islice(A366868_gen(),20))
Original entry on oeis.org
1, 4, 15, 26, 81, 158, 417, 990, 2491, 6402, 17363, 44450, 119773, 326786, 659957, 1845500, 4779649, 9921002, 27575339, 67458614, 187615521, 515594444, 1433794185, 3989181038, 11160791967, 31287537756
Offset: 1
-
from itertools import count, islice
from sympy import nextprime
def A366869_gen(): # generator of terms
a, aset, p = 1, {0,1}, 2
for i in count(3):
for b in count(a,p):
if b not in aset:
aset.add(b)
c = b%(p:=nextprime(p))
if c > a:
yield c
a = c
break
A366869_list = list(islice(A366869_gen(), 20))
Showing 1-2 of 2 results.
Comments