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.
%I A117767 #21 Feb 16 2025 08:33:00 %S A117767 3,3,5,5,7,7,9,9,9,11,11,13,13,13,13,15,15,15,17,17,17,17,19,19,19,21, %T A117767 21,21,21,21,23,23,23,23,25,25,25,25,25,27,27,27,27,27,29,29,29,29,31, %U A117767 31,31,31,31,31,33,33,33,33,33,33,33,35,35,35,35,35,37,37,37,37,37,37 %N A117767 a(n) is the difference between the smallest square greater than prime(n) and the largest square less than prime(n), where prime(n) = A000040(n) is the n-th prime number. %C A117767 From _Reinhard Zumkeller_, Sep 20 2014: (Start) %C A117767 a(n) <= floor(2*sqrt(prime(n))) + 1 = A247485(n). %C A117767 a(A247514(n)) = A247485(A247514(n)). %C A117767 a(A247515(n)) < A247485(A247515(n)). (End) %H A117767 Reinhard Zumkeller, <a href="/A117767/b117767.txt">Table of n, a(n) for n = 1..10000</a> %H A117767 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LegendresConjecture.html">Legendre's Conjecture</a>. %F A117767 a(n) = 2*A000006(n) + 1. %F A117767 a(n) = 2*floor(sqrt(prime(n))) + 1. - _R. J. Mathar_, Apr 21 2006 %e A117767 The 7th prime number is 17, which is between the consecutive squares 16 and 25, so a(7) = 25 - 16 = 9. %t A117767 a[n_]:=2Floor[Sqrt[Prime[n]]]+1 %o A117767 (PARI) { forprime(p=2,200, f = floor(sqrt(p)) ; print1(2*f+1,",") ; ) ; } \\ _R. J. Mathar_, Apr 21 2006 %o A117767 (Haskell) %o A117767 a117767 = (+ 1) . (* 2) . a000006 -- _Reinhard Zumkeller_, Sep 20 2014 %Y A117767 Cf. A000040, A000006. %Y A117767 Cf. A096494, A247485, A247514, A247515. %K A117767 easy,nonn %O A117767 1,1 %A A117767 _Odimar Fabeny_, Apr 15 2006 %E A117767 More terms from _R. J. Mathar_, Apr 21 2006 %E A117767 Edited by _Dean Hickerson_, Jun 03 2006