login
A350170
Start from the sequence of primes, keep the 1st, then delete 2 primes, keep the next, delete 3 primes, keep the next, delete 5 primes, etc ...
0
2, 7, 19, 43, 79, 139, 223, 317, 443, 601, 809, 1021, 1291, 1601, 1949, 2311, 2729, 3251, 3727, 4283, 4937, 5563, 6263, 6983, 7817, 8713, 9623, 10597, 11657, 12641, 13723, 14957, 16217, 17581, 19031, 20479, 21997, 23567, 25247, 26927, 28711, 30671, 32531
OFFSET
1,1
REFERENCES
J.-P. Delahaye, Des suites fractales d’entiers, Pour la Science, No. 531 January 2022. Sequence c) p. 82.
PROG
(Python)
from sympy import nextprime
from itertools import islice
def primes(p=2):
while True: yield p; p = nextprime(p)
def agen():
seq1, seq2 = primes(), primes()
while True:
p, q = next(seq1), next(seq2)
yield p
for i in range(q):
p = next(seq1)
print(list(islice(agen(), 43))) # Michael S. Branicky, Dec 18 2021
CROSSREFS
Cf. A000040.
Sequence in context: A215208 A100119 A322385 * A220697 A078842 A110299
KEYWORD
nonn
AUTHOR
Michel Marcus, Dec 18 2021
STATUS
approved