login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A087269
Nonprime solutions to gcd(x, pi(x)) = gcd(x, A000720(x)) = 1.
3
1, 9, 12, 18, 21, 25, 26, 28, 32, 34, 35, 36, 42, 45, 49, 52, 55, 57, 60, 65, 68, 69, 70, 74, 76, 81, 84, 85, 86, 87, 88, 91, 95, 98, 99, 104, 106, 110, 111, 112, 119, 121, 128, 129, 130, 133, 135, 141, 143, 145, 147, 155, 158, 159, 160, 161, 162, 165, 170, 172, 177
OFFSET
1,2
COMMENTS
What is the density of this sequence? - David A. Corneth, Oct 21 2019
LINKS
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