login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A263204 Number of twin prime pairs between n^2 and (n+2)^2. 2
2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 2, 3, 3, 3, 4, 3, 2, 1, 2, 3, 2, 2, 3, 4, 2, 0, 3, 5, 2, 1, 4, 5, 2, 3, 5, 3, 4, 3, 3, 5, 3, 4, 5, 6, 6, 4, 5, 3, 2, 4, 6, 4, 2, 3, 2, 6, 9, 8, 5, 3, 5, 7, 7, 8, 7, 4, 5, 5, 6, 5, 3, 4, 5, 7, 7, 3, 3, 6, 5, 6, 9, 7, 4, 5, 7, 5, 3, 5, 5, 5, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: (i) a(n) > 0 except for n = 26.

(ii) For any integer n > 0, there is a cousin prime pair {p, p+4} between n^2 and (n+2)^2.

(iii) For each n = 1,2,3,... there is a prime p between n^2 and (n+2)^2 such that 2*p-1 is also prime. Also, for any integer n > 0 not equal to 55, there is a Sophie Germain prime between n^2 and (n+2)^2.

Compare this with Legendre's conjecture which states that for any integer n > 0 there is a prime between n^2 and (n+1)^2.

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 1..10000

EXAMPLE

a(1) = 2 since there are exactly two twin prime pairs (namely, {3, 5} and {5, 7}) between 1^2 = 1 and (1+2)^2 = 9.

a(8) = 1 since there is a unique twin prime pair {71, 73} between 8^2 = 64 and (8+2)^2 = 100.

a(18) = 1 since there is a unique twin prime pair {347, 349} between 18^2 = 324 and (18+2)^2 = 400.

a(30) = 1 since there is a unique twin prime pair {1019, 1021} between 30^2 = 900 and (30+2)^2 = 1024.

MATHEMATICA

TW[n_]:=TW[n]=PrimeQ[Prime[n]+2]

Do[r=0; Do[If[TW[k], r=r+1], {k, PrimePi[n^2]+1, PrimePi[(n+2)^2-2]}]; Print[n, " ", r]; Continue, {n, 1, 100}]

PROG

(Perl) use ntheory ":all"; say twin_prime_count($_**2, ($_+2)**2) for 1..100;  # Dana Jacobsen, Oct 13 2015

(PARI) vector(100, n, my(t, p=2); forprime(q=n^2, (n+2)^2, if(q-p==2, t++); p=q); t) \\ Altug Alkan, Oct 13 2015

CROSSREFS

Cf. A000290, A001097, A001359, A005382, A005384, A006512, A023200, A046132.

Sequence in context: A297034 A190311 A117005 * A194322 A052010 A138471

Adjacent sequences:  A263201 A263202 A263203 * A263205 A263206 A263207

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Oct 10 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 28 03:59 EDT 2018. Contains 304733 sequences. (Running on oeis4.)