OFFSET
1,12
LINKS
Diana Mecum, Table of n, a(n) for n = 1..1170
EXAMPLE
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.
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 02 2006
EXTENSIONS
Corrected and extended by Diana L. Mecum, Jul 19 2008
STATUS
approved