login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228286 Smallest x + y*z, given x*y + z = n (for positive integers x, y, z). 5
2, 3, 4, 4, 6, 5, 7, 6, 6, 7, 9, 7, 10, 9, 8, 8, 12, 9, 12, 9, 10, 13, 15, 10, 10, 15, 12, 11, 15, 11, 16, 12, 14, 17, 12, 12, 17, 21, 16, 13, 18, 13, 19, 15, 14, 19, 24, 14, 14, 15, 20, 17, 21, 15, 16, 15, 22, 25, 28, 16, 22, 27, 16, 16, 18, 17, 23, 21, 25, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
One of the terms in this sequence is the subject of a problem on the 2013 ARML contest (Team Round).
The Mathematica code below computes the quadruple {x, y, z, a(n)}, where z is as small as possible (in the event of a tie).
LINKS
EXAMPLE
For n = 160, a(n) = 50, as 26 * 6 + 4 = 160 and 26 + 6 * 4 = 50 and no triple of positive integers (x, y, z) with xy + z = 160 gives a smaller value for x + yz.
MAPLE
A228286 := proc(n)
local a, x, y, z ;
a := n+n^2 ;
for z from 1 to n-1 do
for x in numtheory[divisors](n-z) do
y := (n-z)/x ;
a := min(a, x+y*z) ;
end do:
end do:
return a;
end proc: # R. J. Mathar, Sep 02 2013
MATHEMATICA
a[n_] := Module[{X, bX, bT, m},
bT = n + 1;
bX = {n - 1, 1, 1, n};
X = bX;
m = Floor[2*Sqrt[X[[3]]*(n - X[[3]])]];
While[bT >= m && X[[3]] <= n/2,
X[[2]] = Max[1, Floor[(n - bX[[3]])/bT]];
While[X[[2]] <= Floor[bT/X[[3]]],
If[Mod[n - X[[3]], X[[2]]] == 0,
X[[1]] = (n - X[[3]])/X[[2]];
X[[4]] = X[[1]] + X[[2]]*X[[3]];
If[X[[4]] < bX[[4]], bX = X]];
X[[2]] = X[[2]] + 1];
X[[3]] = X[[3]] + 1;
m = Floor[2*Sqrt[X[[3]]*(n - X[[3]])]]];
Return[bX]]; Table[a[n][[-1]], {n, 2, 100}]
CROSSREFS
Cf. A228287 (z-coordinate of the triple (x, y, z) that minimizes x + yz).
Cf. A228288 (least k such that z = n, given xy + z = k and x + yz is minimized).
Sequence in context: A301764 A181833 A202650 * A158973 A071323 A071324
KEYWORD
nonn,look
AUTHOR
Andy Niedermaier, Aug 19 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 14:53 EDT 2024. Contains 372310 sequences. (Running on oeis4.)