A275768 a(n) is the number of ways to express n = (prime(i) + prime(j))/2 when (prime(i) - prime(j))/2 also is prime.
0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 2, 0, 2, 0, 1, 1, 2, 0, 3, 0, 2, 1, 1, 0, 5, 0, 1, 0, 0, 0, 5, 0, 1, 0, 1, 0, 5, 0, 0, 1, 1, 0, 6, 0, 1, 1, 1, 0, 5, 0, 2, 0, 0, 0, 5, 0, 2, 0, 0, 0, 10, 0, 0, 0, 1, 0, 8, 0, 0, 1, 2, 0, 6, 0, 0, 0, 2, 0, 8, 0, 0, 1
Offset: 0
Keywords
Examples
a(8) = 2 because (13-3)/2 = 5 and (13+3)/2 = 8; and (11-5)/2 = 3 and (11+5)/2 = 8.
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10000
- Jamie Morken, Graph showing formation of primorial bands for n = 0..100000
- Jamie Morken, Graph showing primorial peaks for n = 30000..30276
Programs
-
Mathematica
Table[Count[Map[{2 n - #, #} &, Range@ n], w_ /; And[Times @@ Boole@ Map[PrimeQ, w] == 1, PrimeQ[(Subtract @@ w)/2]]], {n, 0, 81}] (* Michael De Vlieger, Apr 30 2017 *) (*Example of a program to find first 1000 terms of a(n)*) For[z = 0, z < 1000, z++, countOfPrimes = 0; countOfPrimes2 = 0; countOfPrimes3 = 0; PnToUse = z; distanceToCheck = PnToUse; For[i = 0, i < distanceToCheck, i++, If[PrimeQ[2*PnToUse - i], countOfPrimes++ If[PrimeQ[(2*PnToUse - i) - PnToUse], countOfPrimes2++ If[PrimeQ[i], countOfPrimes3++]],]] Print[countOfPrimes3]] (* Jamie Morken, May 20 2017 *)
Comments