%I #14 Jun 04 2019 14:44:40
%S 1,1,1,2,2,1,1,2,3,3,3,2,2,2,2,4,4,4,4,3,3,3,3,2,5,5,5,5,5,3,3,4,4,4,
%T 4,6,6,6,6,6,6,3,3,3,3,3,3,4,7,7,7,7,7,7,7,5,5,5,5,3,3,3,3,8,8,8,8,8,
%U 8,8,8,6,6,6,6,6,6,6,6,6,9,9,9,9,9,9,9,9,9,4,4,4,4,4,4,4,4,7,7,10,10,10,10
%N a(n) = maximum value among all k where 1<=k<=n of gcd(k,floor(n/k)).
%C a(n) is the greatest m such that floor(n/m^2) > n/(m^2+m). - _Robert Israel_, Jun 04 2019
%H Robert Israel, <a href="/A120423/b120423.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 10, we have the pairs {k,floor(n/k)} of {1,10},{2,5},{3,3},{4,2},{5,2},{6,1},{7,1},{8,1},{9,1},{10,1}. The GCD's of these 10 pairs are 1,1,3,2,1,1,1,1,1,1. Of these, 3 is the largest. So a(10) = 3.
%p a:=n->max(seq(gcd(k,floor(n/k)),k=1..n)): seq(a(n),n=1..112); # _Emeric Deutsch_, Jul 24 2006
%p # Alternative:
%p f:= proc(n) local m,a;
%p for m from floor(sqrt(n)) by -1 do
%p a:= floor(n/m^2);
%p if n < a*(m^2+m) then return m fi
%p od
%p end proc:
%p map(f, [$1..200]); # _Robert Israel_, Jun 04 2019
%t Table[Max[Table[GCD[k, Floor[n/k]], {k, 1, n}]], {n, 1, 100}] (* _Stefan Steinerberger_, Jul 22 2006 *)
%K nonn,look
%O 1,4
%A _Leroy Quet_, Jul 11 2006
%E More terms from _Stefan Steinerberger_ and _Emeric Deutsch_, Jul 22 2006