A218333 The index of the smallest n-isolated prime p such that p/n is not between 2 and 3 and not between the smaller and greater primes of a twin prime pair, or 0 if no such p exists.
5, 5, 8, 10, 2, 12, 7, 4, 37, 23, 5, 51, 3, 6, 34, 23, 5, 57, 9, 22, 49, 66, 64, 54, 5, 56, 43, 28, 46, 116, 56, 232, 92, 170, 65, 206, 181, 379, 170, 511, 190, 416, 187, 448, 89, 143, 200, 159, 434, 670, 145, 1081, 213, 1011, 680, 77
Offset: 2
Keywords
Examples
Let n=2. The 2-isolated primes are in A166251. The first 2-isolated prime is 5, and 5/2 is between 2 and 3. The second 2-isolated prime is 7, and 7/2 is between 3 and 5. The third 2-isolated prime is 23, and 23/2 is between 11 and 13. The fourth 2-isolated prime is 37, and 37/2 is between 17 and 19. The fifth 2-isolated prime is 79, and 79/2 is between 37 and 41. Since (37,41) is not (2,3) and is not a twin prime pair, a(2)=5
Links
- V. Shevelev, Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes, Journal of Integer Sequences, Vol. 15 (2012), Article 12.5.4
Programs
-
PARI
isoki(p, n) = (p==nextprime(n*precprime(p\n))) && (p==precprime(n*nextprime(p/n))); \\ A166251 nextp(p, n) = while(! isoki(p, n), p = nextprime(p+1)); p; isokp(p, n) = {my(diff = nextprime(p/n) - precprime(p/n)); if ((diff == 1) || (diff == 2), return (0)); return (1);} a(n) = {my(p = nextp(2, n), nb = 1); while (! isokp(p, n), p = nextp(nextprime(p+1), n); nb++;); nb;} \\ Michel Marcus, Dec 16 2018
Extensions
a(6)-a(38) were calculated by Zak Seidov, Oct 28 2012
More terms from Michel Marcus, Dec 16 2018
Comments