cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A116992 Number of primes < (highest prime dividing any composite between the n-th and (n+1)th prime) that are coprime to every composite between the n-th and (n+1)th prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 1, 4, 1, 3, 0, 4, 3, 0, 4, 9, 6, 6, 0, 4, 10, 0, 6, 4, 9, 11, 6, 10, 0, 2, 15, 17, 6, 16, 0, 5, 0, 19, 2, 13, 14, 25, 5, 3, 13, 0, 12, 23, 23, 15, 0, 24, 28, 12, 12, 20, 20, 3, 31, 22, 31, 27, 7, 0, 32, 32, 7, 6, 37, 36, 34, 40, 14, 20, 0, 33, 0, 19, 0, 40
Offset: 1

Views

Author

Leroy Quet, Apr 02 2006

Keywords

Examples

			Between the 12th prime and the 13th prime are the composites 38, 39 and 40.
Dividing these composites are the primes 2, 3, 5, 13 and 19. There are three primes < 19 and coprime to the composites between 37 and 41: 7, 11 and 17. So a(12) = 3.
		

Crossrefs

Cf. A052248.

Programs

  • PARI
    a(n) = {p = prime(n); q = prime(n+1); vp = []; for (x=p+1, q-1, f = factor(x); for (i=1, #f~, vp = Set(concat(vp, f[i, 1])));); if (#vp == 0, return (0)); nb = 0; forprime (pp=2, precprime(vecmax(vp)-1), ok = 1; for (x=p+1, q-1, if (gcd(x, pp) != 1, ok = 0; break;);); if (ok, nb++);); nb;} \\ Michel Marcus, Mar 01 2015

Extensions

Corrected and extended by Diana L. Mecum, Jul 19 2008