This is going to be hard to explain so I'll just give an example
Let's say we have a standard arithmetic sequence that goes up by 1 each time
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
The last number (in this case, 10) is n
Scenario z:
Pick 2 numbers in the sequence and multiply them. The product should be equal to the rest of the numbers added together. For example, 6 and 7 (let's call 6 and 7 x and y for now) are between 1 and 10 and if multiplied together, we get 42. Add 1+2+3+4+5+8+9+10 (don't count the numbers that were multiplied together) and we also get 42.
n can only be an integer, no decimals involved here.
x and y has to be an integer between 0 and and n, and x cannot be equal to y
The question is, is there a mathematical way for figuring out the different numbers that can represent n that satisfies scenario z? And if n does satisfy the given scenario, is there a way to figure out x and y without having to try every possible combination?
$n^2+1$ numbers seems to always work (10, 17, 26, 37 etc), and I have no clue why.
I know I explained this pretty badly, feel free to ask any questions regarding this.