%I #24 Jan 09 2013 03:12:06
%S -1,-1,-1,0,-1,1,-1,2,3,3,-1,5,-1,5,7,8,-1,9,-1,11,11,9,-1,14,15,11,
%T 15,17,-1,19,-1,20,19,15,23,24,-1,17,23,27,-1,29,-1,29,31,21,-1,34,35,
%U 35,31,35,-1,39,39,41,35,27,-1,44,-1,29,47,48,47,49,-1,47,43,53,-1,55,-1,35,55,53,59,59,-1,62
%N Largest k >= 0 such that k = n - x - y where n = x*y, x > 0, y > 0, or -1 if no such k exists.
%C Any number n can be written as n=1*n, therefore max{ n-x-y; x>0, y>0, x*y=n } >= -1, with equality for prime numbers. - _M. F. Hasler_, Dec 29 2012
%F a(n) = n - A063655(n).
%F a(n) = max { n-x-y ; x>0, y>0, x*y = n }. - _M. F. Hasler_, Dec 29 2012
%e a(4) = 0 because 4 = 2*2 and 0 = 4 - 2 - 2.
%p A220114 := proc(n)
%p local k,x;
%p k := {-1} ;
%p for x in numtheory[divisors](n) do
%p k := k union {n-x-n/x} ;
%p end do:
%p return max(op(k)) ;
%p end proc: # _R. J. Mathar_, Jan 08 2013
%K sign
%O 1,8
%A _Gerasimov Sergey_, Dec 06 2012
%E Corrected by _R. J. Mathar_, Jan 08 2013