OFFSET
1,1
COMMENTS
This sequence can also be generated by the N-sieve.
LINKS
Michael P. May, Properties of Higher-Order Prime Number Sequences, Missouri J. Math. Sci. (2020) Vol. 32, No. 2, 158-170; and arXiv version, arXiv:2108.04662 [math.NT], 2021.
FORMULA
EXAMPLE
a(1) = prime(A333244(1)) = prime(11) = 31.
MATHEMATICA
b[n_] := b[n] = If[PrimeQ[n], 1+b[PrimePi[n]], 0];
a[n_] := a[n] = Module[{p}, p = If[n==1, 1, a[n-1]]; While[True, p = NextPrime[p]; If[#>3 && OddQ[#]&[b[p]], Break[]]]; p];
Array[a, 50]
PROG
(PARI) b(n)={my(k=0); while(isprime(n), k++; n=primepi(n)); k};
apply(x->prime(prime(prime(prime(x)))), select(n->b(n)%2, [1..500])) \\ Michel Marcus, Nov 18 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael P. May, Nov 11 2022
STATUS
approved