How to solve 700 = 7x + 6y for a range of values? Last time I did any maths was A-Level (some time ago!).
This is a programming/layout problem where I need to display 7 items across a page, with 6 gaps between them. I have a fixed width, but need to determine values of x and y that are integers where x > y.
This 'feels' like something I could plot on a graph, hence solve with calculus but I need a pointer in the right direction. Ideally I'd like to solve it programatically but I need an understanding of how to solve it first. Further down the line, I'd like to be able to vary the number of items to get different values.
Thanks

$$700 = 7x + 6y\implies y = \frac{-7(x - 100)}{6}$$
Experimentation in a spreadsheet shows that [integer] $x,y$ values increase/decrease by amounts corresponding to their opposite coefficients. For example, a valid $x$-value occurs only every $6$ integers and a resulting $y$-value occurs every $7$ integers. Here is a sample to show the effect.
$$(-14,133)\quad (-8,126)\quad (-2,119)\quad (4,112)\quad (10,105)\quad (16,98)\quad $$
A little math shows the predictable values and relationships to be as follows.
$$x = 6 n + 4 \qquad y = 112 - 7 n \qquad  n \in\mathbb{Z}$$
Now, if we have a known $x$-range, we can find $n$ by plugging $x$-lo and $x$-hi into
$$n = \frac{(x - 4)}{6}$$
and rounding up or down to get the integer values desired and needed.
