login
A257230
Floor(sqrt(q)-(q-p)), where p and q are consecutive primes.
2
0, 0, 0, -1, 1, 0, 2, 0, -1, 3, 0, 2, 4, 2, 1, 1, 5, 2, 4, 6, 2, 5, 3, 1, 6, 8, 6, 8, 6, -3, 7, 5, 9, 2, 10, 6, 6, 8, 7, 7, 11, 3, 11, 10, 12, 2, 2, 11, 13, 11, 9, 13, 5, 10, 10, 10, 14, 10, 12, 14, 7, 3, 13, 15, 13, 4, 12, 8, 16, 14, 12, 11, 13, 13, 15, 13, 11, 16, 12, 10, 18
OFFSET
1,7
COMMENTS
Conjecture: a(n) is always positive for n > 30, and is negative only for n = 4, 9 and 30, corresponding to prime pairs (7, 11), (23, 29) and (113, 127).
Related to prime gap conjectures by (e.g.) Legendre, Oppermann, Andrica and Brocard.
LINKS
Eric Weisstein's World of Mathematics, Prime Gaps
EXAMPLE
a(30) = -3 because sqrt(127)-(127-113) = -2.73057...
a(31) = 7 because sqrt(131)-(131-127) = 7.44552...
MATHEMATICA
Table[Floor[Sqrt[NextPrime[Prime@ p]] - (NextPrime[Prime@ p] - Prime@ p)], {p, 81}] (* Michael De Vlieger, Apr 19 2015 *)
PROG
(PARI) a(n)=floor(sqrt(prime(n+1))-(prime(n+1)-prime(n)))
(Magma) [Floor(Sqrt(NthPrime(n+1))-(NthPrime(n+1)-NthPrime(n))): n in [1..100]]; // Vincenzo Librandi, Apr 19 2015
CROSSREFS
Cf. A257231.
Sequence in context: A353778 A173662 A263406 * A357136 A172026 A296046
KEYWORD
sign,easy
AUTHOR
Chris Boyd, Apr 19 2015
STATUS
approved