The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A053187 Square nearest to n. 13
 0, 1, 1, 4, 4, 4, 4, 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Apart from 0, k^2 appears 2k times from a(k^2-k+1) through to a(k^2+k) inclusive. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 FORMULA a(n) = ceiling((-1 + sqrt(4*n+1))/2)^2. - Robert Israel, Aug 01 2014 G.f.: (1/(1-x))*Sum_{n>=0} (2*n+1)*x^(n^2+n+1)). - Robert Israel, Aug 01 2014.  This is related to the Jacobi theta-function theta'_1(q), see A002483 and A245552. G.f.: x / (1-x) * Sum_{k>0} (2*k - 1) * x^(k^2 - k). - Michael Somos, Jan 05 2015 a(n) = floor(sqrt(n)+1/2)^2. - Mikael Aaltonen, Jan 17 2015 EXAMPLE a(7)=9 since 7 is closer to 9 than to 4. G.f. = x + x^2 + 4*x^3 + 4*x^4 + 4*x^5 + 4*x^6 + 9*x^7 + 9*x^8 + 9*x^9 + ... MAPLE seq(ceil((-1+sqrt(4*n+1))/2)^2, n=0..20); # Robert Israel, Jan 05 2015 MATHEMATICA nearestSq[n_] := Block[{a = Floor@ Sqrt@ n}, If[a^2 + a + 1/2 > n, a^2, a^2 + 2 a + 1]; Array[ nearestSq, 75, 0] (* Robert G. Wilson v, Aug 01 2014 *) PROG (Haskell) a053187 n = a053187_list !! n a053187_list = 0 : concatMap (\x -> replicate (2*x) (x ^ 2)) [1..] -- Reinhard Zumkeller, Nov 28 2011 CROSSREFS Cf. A048760, A053188, A002483, A245552. Cf. A061023, A201053 (nearest cube), A000290. Sequence in context: A114555 A124570 A213083 * A013189 A295643 A190718 Adjacent sequences:  A053184 A053185 A053186 * A053188 A053189 A053190 KEYWORD easy,nonn AUTHOR Henry Bottomley, Mar 01 2000 EXTENSIONS Title improved by Jon E. Schoenfield, Jun 09 2019 STATUS approved

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

Last modified January 22 07:39 EST 2020. Contains 331139 sequences. (Running on oeis4.)