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.

Showing 1-1 of 1 results.

A257230 Floor(sqrt(q)-(q-p)), where p and q are consecutive primes.

Original entry on oeis.org

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

Views

Author

Chris Boyd, Apr 19 2015

Keywords

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.

Examples

			a(30) = -3 because sqrt(127)-(127-113) = -2.73057...
a(31) = 7 because sqrt(131)-(131-127) = 7.44552...
		

Crossrefs

Cf. A257231.

Programs

  • Magma
    [Floor(Sqrt(NthPrime(n+1))-(NthPrime(n+1)-NthPrime(n))): n in [1..100]]; // Vincenzo Librandi, Apr 19 2015
  • Mathematica
    Table[Floor[Sqrt[NextPrime[Prime@ p]] - (NextPrime[Prime@ p] - Prime@ p)], {p, 81}] (* Michael De Vlieger, Apr 19 2015 *)
  • PARI
    a(n)=floor(sqrt(prime(n+1))-(prime(n+1)-prime(n)))
    
Showing 1-1 of 1 results.