The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 5
 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, 21, 21, 21, 21, 23, 23, 23, 23, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, 35, 35, 35, 35, 35, 37, 37, 37, 37, 37, 37 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS From Reinhard Zumkeller, Sep 20 2014: (Start) a(n) <= floor(2*sqrt(prime(n))) + 1 = A247485(n). a(A247514(n)) = A247485(A247514(n)). a(A247515(n)) < A247485(A247515(n)). (End) LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 Eric Weisstein's World of Mathematics, Legendre's Conjecture. FORMULA a(n) = 2*A000006(n) + 1. a(n) = 2*floor(sqrt(prime(n))) + 1. - R. J. Mathar, Apr 21 2006 EXAMPLE The 7th prime number is 17, which is between the consecutive squares 16 and 25, so a(7) = 25 - 16 = 9. MATHEMATICA a[n_]:=2Floor[Sqrt[Prime[n]]]+1 PROG (PARI) { forprime(p=2, 200, f = floor(sqrt(p)) ; print1(2*f+1, ", ") ; ) ; } \\ R. J. Mathar, Apr 21 2006 (Haskell) a117767 = (+ 1) . (* 2) . a000006 -- Reinhard Zumkeller, Sep 20 2014 CROSSREFS Cf. A000040, A000006. Cf. A096494, A247485, A247514, A247515. Sequence in context: A133909 A177691 A206913 * A340836 A293701 A296063 Adjacent sequences: A117764 A117765 A117766 * A117768 A117769 A117770 KEYWORD easy,nonn AUTHOR Odimar Fabeny, Apr 15 2006 EXTENSIONS More terms from R. J. Mathar, Apr 21 2006 Edited by Dean Hickerson, Jun 03 2006 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 26 19:43 EST 2024. Contains 370352 sequences. (Running on oeis4.)