A147517 Number of pairs of primes p < q such that (p+q)/2 = A002110(n), the n-th primorial.
0, 1, 6, 30, 190, 1564, 17075, 226758, 3792532, 82116003, 1975662890
Offset: 1
Examples
There are 6 pairs centered at primorial=30: (29,31),(23,37),(19,41),(17,43),(13,47),(7,53). As they are symmetrical, each prime pair sums to twice the primorial center.
Links
- Bill McEachen, PARI script, Jun 03 2010
Programs
-
Mathematica
f = Compile[{{n, Integer}}, Block[{p = 2, c = 0, pn = Times @@ Prime@ Range@ n}, While[p < pn, If[PrimeQ[ 2pn -p], c++]; p = NextPrime@ p]; c]]; Array[f, 10] (* _Robert G. Wilson v, Feb 08 2018 *)
-
PARI
a(n) = pn = prod(k=1, n, prime(k)); nb = 0; forprime(p=2, pn-1, if (isprime(2*pn-p), nb++)); nb; \\ Michel Marcus, Jul 09 2017
Extensions
Better description by T. D. Noe, Nov 09 2008
Typo corrected typo by T. D. Noe, Nov 10 2008
Edited by Michel Marcus, Jul 09 2017
a(10)-a(11) from Bill McEachen, Jan 30 2018
Comments