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”).

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.
1

%I #13 Mar 01 2015 16:49:41

%S 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,

%T 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,

%U 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

%N 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.

%H Diana Mecum, <a href="/A116992/b116992.txt">Table of n, a(n) for n = 1..1170</a>

%e Between the 12th prime and the 13th prime are the composites 38, 39 and 40.

%e 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.

%o (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

%Y Cf. A052248.

%K nonn

%O 1,12

%A _Leroy Quet_, Apr 02 2006

%E Corrected and extended by _Diana L. Mecum_, Jul 19 2008