A138205 Least number k such that n^2+k and n^2+k+2 are the smallest twin primes between squares n^2 and (n+1)^2, or 0 if there is no such k.
0, 1, 2, 1, 4, 5, 10, 7, 0, 1, 16, 5, 10, 1, 2, 13, 22, 23, 0, 19, 20, 37, 40, 23, 16, 0, 0, 25, 16, 0, 58, 7, 2, 0, 4, 5, 58, 7, 0, 7, 16, 23, 22, 13, 2, 13, 28, 5, 0, 49, 56, 7, 0, 53, 94, 31, 2, 7, 46, 71, 46, 7, 32, 31, 4, 65, 28, 13, 26, 31, 58, 47, 88, 1, 14, 73, 0, 5, 28, 49, 8, 37
Offset: 1
Keywords
Examples
a(7)=10 because (59,61) is the smallest twin-prime pair between 49 and 64.
Links
- T. D. Noe, Table of n, a(n) for n=1..10000
Crossrefs
Cf. A091591 (number of twin prime pairs between n^2 and (n+1)^2).
Programs
-
Mathematica
Table[n2=n^2; k=1; While[k<2n+1 && !(PrimeQ[n2+k] && PrimeQ[n2+k+2]), k++ ]; If[k==2n+1,0,k], {n,10^4}]
Comments