OFFSET
1,1
EXAMPLE
k s=sqrt(k) x/y |s - x/y|
2 1.4142135... 3/2 0.0857864... new minimum
3 1.7320508... 5/3 0.0653841... new minimum
5 2.2360679... 9/4 0.0139320... new minimum
6 2.4494897... 5/2 0.0505102...
7 2.6457513... 8/3 0.0209153...
8 2.8284271... 17/6 0.0049062... new minimum
10 3.1622776... 19/6 0.0043890... new minimum
11 3.3166247... 10/3 0.0167085...
12 3.4641016... 7/2 0.0358983...
13 3.6055512... 18/5 0.0055512...
14 3.7416573... 15/4 0.0083426...
15 3.8729833... 31/8 0.0020166... new minimum
17 4.1231056... 33/8 0.0018943... new minimum
18 4.2426406... 17/4 0.0073593...
19 4.3588989... 61/14 0.0017560... new minimum
20 4.4721359... 76/17 0.0015477... new minimum
.
a(1)..a(9) = [2, 3, 5, 8, 10, 15, 17, 19, 20]
A306973(1..9) = [3, 5, 9, 17, 19, 31, 33, 61, 76]
A306974(1..9) = [2, 3, 4, 6, 6, 8, 8, 14, 17]
PROG
(PARI) dmin=1; for(k=2, 3200, if(!issquare(k), s=sqrt(k); d=abs(s-bestappr(s, k)); if(d<dmin, dmin=d; print1(k, ", "))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Mar 18 2019
STATUS
approved