|
|
A063790
|
|
a(n) is the smallest prime gap between n^2 and (n+1)^2.
|
|
1
|
|
|
1, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 6, 4, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n)=2 indicates at least one twin prime.
a(1) = 1. a(n) = 4 for n in {9, 19, 26, 27, 30, 34, 39, 49, 53, 77, 122}. Is a(n) = 2 for all other n? That is, for n > 122, is there always a twin prime between n^2 and (n+1)^2? It holds for the first million terms.
This is a stronger version of the conjecture (on which the definition of this sequence relies!) that there is always a prime between n^2 and (n+1)^2. (End)
|
|
LINKS
|
|
|
EXAMPLE
|
Primes between 81 = 9^2 and 100 = (9+1)^2: 83, 89 and 97; so 89 - 83 = 6 = a(9).
|
|
PROG
|
(PARI) { for (n=1, 2000, p=nextprime(n^2); q=precprime((n + 1)^2); a=q-p; r=0; while (r<q, r=nextprime(p+1); g=r-p; p=r; if (g<a, a=g)); write("b063790.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 31 2009
(PARI) a(n)=my(p=nextprime(n^2), q=nextprime(p+1), r=q-p, N=(n+1)^2); while(r>2&q<N, p=q; q=nextprime(q+1); if(q-p<r, r=q-p)); r \\ Charles R Greathouse IV, Feb 15 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|