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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246934 The closest square to n-th prime. 2

%I #13 Oct 02 2014 22:45:51

%S 1,4,4,9,9,16,16,16,25,25,36,36,36,49,49,49,64,64,64,64,81,81,81,81,

%T 100,100,100,100,100,121,121,121,144,144,144,144,169,169,169,169,169,

%U 169,196,196,196,196,225,225,225,225,225,225,256,256,256,256,256,256,289,289,289,289

%N The closest square to n-th prime.

%H Zak Seidov, <a href="/A246934/b246934.txt">Table of n, a(n) for n = 1..1000</a>

%e a(5) = 9 because 5th prime is 11, and 11-9<16-11, that is 9 is the closest square to 11.

%o (PARI){forprime (p = 2, 300, a = sqrtint (p); b = (a + 1)^2; a = a^2;

%o s = if (b - p > p - a, a, b); print1 (s ", "))}

%K nonn

%O 1,2

%A _Zak Seidov_, Oct 02 2014

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 01:31 EDT 2024. Contains 374388 sequences. (Running on oeis4.)