A077118 Nearest integer square to n^3.
0, 1, 9, 25, 64, 121, 225, 361, 529, 729, 1024, 1296, 1764, 2209, 2704, 3364, 4096, 4900, 5776, 6889, 7921, 9216, 10609, 12100, 13924, 15625, 17689, 19600, 21904, 24336, 26896, 29929, 32761, 36100, 39204, 42849, 46656, 50625, 54756, 59536
Offset: 0
Keywords
Examples
a(5)=121, as 121=11^2 is the nearest square to 125=5^3.
Programs
-
Mathematica
Table[Round[Sqrt[n^3]]^2, {n, 0, 39}] (* Alonso del Arte, Dec 07 2011, based on Artur Jasinski's program for A077119 *)
-
Python
from math import isqrt def A077118(n): return ((m:=isqrt(k:=n**3))+int((k-m*(m+1)<<2)>=1))**2 # Chai Wah Wu, Jul 29 2022