login
A293504
The integer k that minimizes |k/n^2 - sqrt(2)|.
3
0, 1, 6, 13, 23, 35, 51, 69, 91, 115, 141, 171, 204, 239, 277, 318, 362, 409, 458, 511, 566, 624, 684, 748, 815, 884, 956, 1031, 1109, 1189, 1273, 1359, 1448, 1540, 1635, 1732, 1833, 1936, 2042, 2151, 2263, 2377, 2495, 2615, 2738, 2864, 2992, 3124, 3258
OFFSET
0,3
LINKS
FORMULA
a(n) = floor(1/2 + (n^2)*sqrt(2)).
a(n) = A293502(n) if (fractional part of (sqrt(2))*n^2) < 1/2, else a(n) = A293503(n).
MATHEMATICA
z = 120; r = Sqrt[2];
Table[Floor[r*n^2], {n, 0, z}]; (* A293502 *)
Table[Ceiling[r*n^2], {n, 0, z}]; (* A293503 *)
Table[Round[r*n^2], {n, 0, z}]; (* A293504 *)
PROG
(PARI) vector(100, n, n--; round(n^2*sqrt(2))) \\ G. C. Greubel, Aug 16 2018
(Magma) [Round(n^2*Sqrt(2)): n in [0..100]]; // G. C. Greubel, Aug 16 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 12 2017
STATUS
approved