OFFSET
1,4
COMMENTS
From Robert Israel, Aug 29 2018: (Start)
a(n) <= sqrt(n), with equality if n is a square.
a(n) >= A033676(n).
a(m+n) >= min(a(m), a(n)). (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(13)=2 since 13=2*2+3*3.
MAPLE
A046805 := proc(n)
local p, a, abmin, divmin;
a := 0 ;
for p in combinat[partition](n) do
abmin := 1+n ;
for abprod in p do
divmin := A033676(abprod) ;
abmin := min(abmin, divmin) ;
end do:
a := max(a, abmin) ;
end do:
a ;
end proc: # R. J. Mathar, Oct 12 2015
# alternative program:
f:= proc(n) option remember; local v, a, b, vmax;
if issqr(n) then return sqrt(n) fi;
vmax:= 1;
for a from floor(sqrt(n)) by -1 while a > vmax do
for b from a to n/a do
v:= min(a, procname(n - a*b));
vmax:= max(vmax, v);
od od;
vmax
end proc:
f(0):= infinity:
map(f, [$1..200]); # Robert Israel, Aug 29 2018
MATHEMATICA
f[n_] := f[n] = Module[{v, a, b, vMax}, If[IntegerQ[Sqrt[n]], Return[ Sqrt[n]]]; vMax = 1; For[a = Floor[Sqrt[n]], a > vMax, a--, For[b = a, b <= n/a, b++, v = Min[a, f[n - a b]]; vMax = Max[vMax, v]]]; vMax];
f[0] = Infinity;
Array[f, 200] (* Jean-François Alcover, Jun 23 2020, after Robert Israel *)
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved