I am trying to find the $(k_1,k_2,...,k_N)$ tuples solutions to an all natural numbers equation in the following form :
Given $n\in\mathbb{N}^{*}$, $N\in\mathbb{N}^{*}$ and $n_i\in\mathbb{N}^{*}\leq n$ for $i=1..N$
$n=\sum_{i=1}^Nk_in_i$ with $k_i\in\mathbb{N}$ for $i=1...N$.
From the solutions, I am trying to find the "biggest" one. I am having trouble explaining the ordering I'm looking for mathematically but an example should do it:
$(4,1,2)>(4,0,1)>(2,58,99)$
Basically the elements are compared in order, and if there is a tie, we check the next ones, and so on and so forth.
Is there a way to formulate this problem in a cleaner way, and a way to solve such equations ?
What I am currently trying is to do a step by step euclidean division, starting by the first $n_i$ and so on. I may however get a remainder at the end, while different choices (for instance lower quotients at some steps) could have resulted in a $0$ remainder at the end.