[go: up one dir, main page]

login
A046805
If n=sum a_i b_i, (a_i,b_i positive integers) then a(n)=max value of min(all a_i and b_i).
2
1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 2, 2, 3, 4, 2, 3, 2, 4, 3, 2, 2, 4, 5, 2, 3, 4, 3, 5, 3, 4, 3, 3, 5, 6, 3, 3, 3, 5, 4, 6, 3, 4, 5, 4, 3, 6, 7, 5, 4, 4, 4, 6, 5, 7, 4, 4, 4, 6, 5, 4, 7, 8, 5, 6, 5, 4, 4, 7, 5, 8, 5, 5, 5, 5, 7, 6, 5, 8, 9, 5, 5, 7, 6, 5, 5, 8, 5, 9, 7, 6, 5, 5, 5, 8, 6, 7, 9, 10, 5, 6, 6, 8
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
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
Cf. A033676.
Sequence in context: A033676 A095165 A355366 * A034880 A257977 A070966
KEYWORD
easy,nice,nonn,look
STATUS
approved