%I #19 Mar 14 2021 15:37:20
%S 0,1,1,2,2,2,3,3,3,4,4,4,4,3,3,4,6,3,3,5,5,4,6,7,5,4,5,4,6,4,4,9,3,3,
%T 9,8,5,7,8,5,6,8,5,7,7,3,8,4,3,10,9,4,8,9,8,10,10,7,10,7,5,9,5,4,12,
%U 10,3,7,9,8,12,11,5,10,6,7,15,9,6,11,9,3,10
%N a(n) is the number of primes p such that both 2n-p and 2n+2-nextprime(p) are prime numbers.
%C In the name, "nextprime(p)" stands for the smallest prime number that is greater than p.
%C Conjecture: a(n) > 0 for all integer n > 1.
%e For n=2, 2n=4, 2n+2=6. Both 4-2=2 and 6-nextprime(2)=6-3=3 are primes. This is the only case, so a(2)=1;
%e For n=3, 2n=6, 2n+2=8. Both 6-3=5 and 8-nextprime(3)=8-5=3 are primes. This is the only case, so a(3)=1;
%e ...
%e For n=8, 2n=16, 2n+2=18. The following cases satisfy the definition:
%e 1) 16-3=13, 18-nextprime(3)=18-5=13;
%e 2) 16-5=11, 18-nextprime(5)=18-7=11;
%e 3) 16-11=5, 18-nextprime(11)=18-13=5.
%e So a(8)=3;
%e ...
%e For n=10, 2n=20, 2n+2=22. The following cases satisfy the definition:
%e 1) 20-3=17, 22-nextprime(3)=22-5=17;
%e 2) 20-7=13, 22-nextprime(7)=22-11=11;
%e 3) 20-13=7, 22-nextprime(13)=22-17=5;
%e 4) 20-17=3, 22-nextprime(17)=22-19=3.
%e So a(10)=4.
%t Table[n = i*2; np2 = n + 2; p = 1; ct = 0; While[p = NextPrime[p]; p < n, If[PrimeQ[n - p] && (cp = np2 - NextPrime[p]; (cp > 0) && PrimeQ[cp]), ct++]]; ct, {i, 1, 83}]
%o (PARI) a(n) = sum(k=1, primepi(2*n), isprime(2*n-prime(k)) && isprime(2*n+2-prime(k+1))); \\ _Michel Marcus_, Jun 21 2018
%Y Cf. A000040, A002375, A045917, A002372.
%K nonn,easy
%O 1,4
%A _Lei Zhou_, Jun 18 2018
|