login
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.
1
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,3
COMMENTS
Checking up to n=10^6, it appears that a(n)=0 for only n=1 and the n in A091592.
EXAMPLE
a(7)=10 because (59,61) is the smallest twin-prime pair between 49 and 64.
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}]
CROSSREFS
Cf. A091591 (number of twin prime pairs between n^2 and (n+1)^2).
Sequence in context: A125156 A119808 A021470 * A137224 A191830 A155944
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 06 2008
STATUS
approved