0
votes
1answer
77 views

Converting loop to a closed form expression? [duplicate]

Possible Duplicate: How to convert this loop into a closed form expression? I have the following code in Python ...
1
vote
1answer
117 views

For integers $a$ and $b \gt 0$, and $n^2$ a sum of two square integers, does this strategy find the largest integer $x | x^2 \lt n^2(a^2 + b^2)$?

Here is some background information on the problem I am trying to solve. I start with the following equation: $n^2(a^2 + b^2) = x^2 + y^2$, where $n, a, b, x, y \in \mathbb Z$, and $a \ge b \gt 0$, ...
5
votes
2answers
135 views

Minimize sum of smallest and largest among integers on the real line.

Suppose there are 3 non-negative integers $x$, $y$ and $z$ on the real line. We are told that $x + y + z = 300$. Without loss of generality, assume $x$ to be the smallest integer, and $z$ to be the ...