login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A333987
Integers m for which b(m) < b(m-1) where b(k) = Min_{sqrt(k) - sqrt(x) - sqrt(y) > 0 with x, y distinct integers}.
1
1, 2, 3, 4, 5, 6, 10, 12, 14, 15, 18, 21, 22, 24, 26, 30, 33, 34, 35, 38, 40, 42, 46, 50, 54, 58, 60, 62, 63, 65, 66, 70, 74, 78, 82, 84, 85, 86, 90, 94, 98, 99, 102, 106, 110, 112, 114, 118, 122, 126, 130, 133, 134, 138, 142, 143, 144, 146, 150, 154, 158, 161
OFFSET
1,2
COMMENTS
b(a(n)) is a closer approximation than b(a(n-1)), where b(k) is the "best approximation" to k using only two radicals as defined in A337210.
Except for the first five terms, all terms present require two positive radicals.
Numbers of the form 4k - 2 for k > 0 are always in the sequence with arguments of their two radicals being k - 1 and k.
4, 12, 24, 40, 60, 84, 112, 144, 180, ... are terms == 0 (mod 4); 1, 5, 21, 33, 65, 85, 133, 161, 225, ... are terms == 1 (mod 4); 3, 15, 35, 63, 99, 143, 195, 255, 323, ... are terms == 3 (mod 4).
MATHEMATICA
y[x_] := Block[{lst = {x - 1}, min = Sqrt[x] - Sqrt[x - 1], rad = 1, sx = Sqrt[x]}, If[x > 5, a = 2; lim = (sx - 1)^2; While[a <= lim, b = 1; While[b < a, diff = sx - (Sqrt[a] + Sqrt[b]); If[ diff < 0, Break[]]; If[diff < min && diff > 0, rad = 2; min = diff; lst = {b, a}]; b++]; a++]]; min]; k = 1; min = Infinity; lst = {}; While[k < 171, a = y@k; If[a < min, min = a; AppendTo[lst, k]]; k++]; lst
PROG
(PARI) b(k) = {my(m=s=sqrt(k), t); for(x=1, k\4, if((t=(t=s-sqrt(x))-sqrt(floor(t^2))) < m && t > 10^-20, m=t)); m; }
lista(nn) = my(r=1); for(k=1, 4, print1(k, ", ")); for(k=1, nn, if(b(k) < r, print1(k, ", "); r=b(k)));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved