OFFSET
1,2
COMMENTS
a(n) is the least m > 0 such that floor(n^3/m) + m = A135061(n). - Robert Israel, Mar 06 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
If t = floor(2*n^(3/2))+1, then a(n) = 1 + floor((t-sqrt(t^2-4*n^3))/2). - Robert Israel, Mar 06 2017
MAPLE
f:= proc(n) local t; t:= floor(2*n^(3/2))+1; 1 + floor((t-sqrt(t^2-4*n^3))/2) end proc:
map(f, [$1..100]); # Robert Israel, Mar 06 2017
MATHEMATICA
a[n_] := With[{t = Floor[2n^(3/2)]+1}, 1 + Floor[(t-Sqrt[t^2-4n^3])/2]];
Array[a, 100] (* Jean-François Alcover, Jul 23 2020, after Maple *)
PROG
(PARI) a(n) = {local( minsum=0, cursum =0, minm=0, lastminsum=0); minsum = n^3 + 1; lastminsum= n^3 + 1; minm =1; for(m=1, n^3, cursum = floor(n^3/m + m); lastminsum = minsum; if(cursum < minsum, minsum = cursum); if(cursum < lastminsum, minm=m); ); minm; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander R. Povolotsky, Feb 11 2008, Feb 15 2008
EXTENSIONS
Corrected and more terms added by Robert Israel, Mar 06 2017
STATUS
approved