cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Mar 06 2008

Keywords

Comments

Checking up to n=10^6, it appears that a(n)=0 for only n=1 and the n in A091592.

Examples

			a(7)=10 because (59,61) is the smallest twin-prime pair between 49 and 64.
		

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