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.

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

This page as a plain text file.
%I A257230 #16 Feb 16 2025 08:33:25
%S A257230 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,
%T A257230 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,
%U A257230 14,7,3,13,15,13,4,12,8,16,14,12,11,13,13,15,13,11,16,12,10,18
%N A257230 Floor(sqrt(q)-(q-p)), where p and q are consecutive primes.
%C A257230 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).
%C A257230 Related to prime gap conjectures by (e.g.) Legendre, Oppermann, Andrica and Brocard.
%H A257230 Chris Boyd, <a href="/A257230/b257230.txt">Table of n, a(n) for n = 1..10000</a>
%H A257230 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeGaps.html">Prime Gaps</a>
%H A257230 Wikipedia, <a href="https://en.wikipedia.org/wiki/Legendre%27s_conjecture">Legendre's conjecture</a>
%e A257230 a(30) = -3 because sqrt(127)-(127-113) = -2.73057...
%e A257230 a(31) = 7 because sqrt(131)-(131-127) = 7.44552...
%t A257230 Table[Floor[Sqrt[NextPrime[Prime@ p]] - (NextPrime[Prime@ p] - Prime@ p)], {p, 81}] (* _Michael De Vlieger_, Apr 19 2015 *)
%o A257230 (PARI) a(n)=floor(sqrt(prime(n+1))-(prime(n+1)-prime(n)))
%o A257230 (Magma) [Floor(Sqrt(NthPrime(n+1))-(NthPrime(n+1)-NthPrime(n))): n in [1..100]]; // _Vincenzo Librandi_, Apr 19 2015
%Y A257230 Cf. A257231.
%K A257230 sign,easy
%O A257230 1,7
%A A257230 _Chris Boyd_, Apr 19 2015