OFFSET
1,1
COMMENTS
All the primes appear in A090252 and in their correct order.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..9800
EXAMPLE
A090252 begins 1, 2, 3, 5, 4, 7, 9, ..., so the indices of the primes are 2, 3, 4, 6, ...
PROG
(Python)
from math import gcd, prod
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
alst, aset, mink = [1], {1}, 2
for n in count(2):
k, s = mink, n - n//2
prodall = prod(alst[n-n//2-1:n-1])
while k in aset or gcd(prodall, k) != 1: k += 1
alst.append(k); aset.add(k)
if isprime(k): yield n
while mink in aset: mink += 1
print(list(islice(agen(), 83))) # Michael S. Branicky, May 23 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 22 2022
STATUS
approved