

A300013


a(n) is the number of primes p such that both 2np and 2n+2nextprime(p) are prime numbers.


0



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, 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, 10, 3, 7, 9, 8, 12, 11, 5, 10, 6, 7, 15, 9, 6, 11, 9, 3, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

In the name, "nextprime(p)" stands for the smallest prime number that is greater than p.
Conjecture: a(n) > 0 for all integer n > 1.


LINKS



EXAMPLE

For n=2, 2n=4, 2n+2=6. Both 42=2 and 6nextprime(2)=63=3 are primes. This is the only case, so a(2)=1;
For n=3, 2n=6, 2n+2=8. Both 63=5 and 8nextprime(3)=85=3 are primes. This is the only case, so a(3)=1;
...
For n=8, 2n=16, 2n+2=18. The following cases satisfy the definition:
1) 163=13, 18nextprime(3)=185=13;
2) 165=11, 18nextprime(5)=187=11;
3) 1611=5, 18nextprime(11)=1813=5.
So a(8)=3;
...
For n=10, 2n=20, 2n+2=22. The following cases satisfy the definition:
1) 203=17, 22nextprime(3)=225=17;
2) 207=13, 22nextprime(7)=2211=11;
3) 2013=7, 22nextprime(13)=2217=5;
4) 2017=3, 22nextprime(17)=2219=3.
So a(10)=4.


MATHEMATICA

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}]


PROG

(PARI) a(n) = sum(k=1, primepi(2*n), isprime(2*nprime(k)) && isprime(2*n+2prime(k+1))); \\ Michel Marcus, Jun 21 2018


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



