OFFSET
1,1
COMMENTS
B_(p+2)(n) - B_p(n) < 6 for all n >= 2 if and only if p = 3.
It is astonishing that, although terms a(n) == 7 or 9 (mod 10) occur often, the first terms a(n)==1 (mod 10) are 11, 165701, ... (cf. A022009). This phenomenon is explained in the Shevelev link.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Vladimir Shevelev, "nearest" twin primes, Post to seqfan, Sep 21 2016.
Vladimir Shevelev, Peter J. C. Moses, Constellations of primes generated by twin primes, arXiv:1610.03385 [math.NT], 2016.
PROG
(PARI) nextcomposite(n)=if(n<4, return(4)); n=ceil(n); if(isprime(n), n+1, n)
is(n)=if(!isprime(n) || !isprime(n+2), return(0)); my(p=n, q=n+2, k=2, f); while(p!=q && q-p<7, f=if(isprime(k++), nextprime, nextcomposite); p=f(p+1); q=f(q+1)); p==q \\ Charles R Greathouse IV, Sep 21 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Sep 21 2016
EXTENSIONS
More terms from Peter J. C. Moses, Sep 21 2016
STATUS
approved