OFFSET
1,2
COMMENTS
What is the density of this sequence? - David A. Corneth, Oct 21 2019
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
There are 37 primes below the nonprime 162, so pi(162) = 37 and as gcd(162, pi(162)) = gcd(162, 37) = 1, 162 is in the sequence. - David A. Corneth, Oct 21 2019
MATHEMATICA
t=Table[GCD[w, PrimePi[w]], {w, 1, 1000}]; f=Flatten[Position[t, 1]]; cf=Part[f, Flatten[Position[PrimeQ[f], False]]]
PROG
(PARI) first(n) = {n = max(n, 2); my(q = 2, i = 1, t = 1, res = vector(n)); res[1] = 1; forprime(p = 3, oo, for(j = q + 1, p - 1, if(gcd(t, j) == 1, i++; if(i <= n, res[i] = j; , return(res); ) ) ); t++; q = p ) } \\ David A. Corneth, Oct 21 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Sep 16 2003
STATUS
approved