Is there a general principle of sorting $t(n)=\sum\limits_{k=1}^{m} a_{k}(n)\omega_k, n,a_{k}(n) \in \mathbb{N}, \omega_k \in \mathbb{R}$? I fail to find a general principle that would allow finding the way $a_{k}(n)$ changes once we sort all $t(n)$.
Assume $\omega_1=\sqrt{2},\omega_2=\sqrt{3},\omega_3=\sqrt{7}$. Once we create all numbers in form of 
$$p_1\sqrt{2}+p_2\sqrt{3}+p_3\sqrt{7}, p_1,p_2, p_3 \in \mathbb{N}$$
and sort them, how do $p_1,p_2,p_3$ change?
I know that the general principle might be simple. We start from $\omega_1, \omega_2, \omega_3$ being integers, then develop the way leading coefficient changes and then simply apply rational approximation to any other $\omega$, but I fail to find what is going on even when $\omega$'s are integers.
If integers allow that coefficients become periodic, then there would have to be a point when the entire cycle starts repeating itself. Say
$$2p_1+3p_2+7p_3, p_1,p_2, p_3 \in \mathbb{N}$$
The sorting would create repeating pattern of increase of $p_1,p_2,p_3$ each $3\cdot2\cdot3\cdot7=126$ or something like that? It does not look like it. But if there is no global cycle, then this problem does not have a simple general solution that I expect.
(Of course, pure integers would give a lot of the same values, but it is easy to resolve just by giving some small increment of any of integers, which would affect sorting these equal values but no other values.)
A correct solution that is valid up to some number is valid as long as we can extend it to whatever number we want.
So the question is simply what $p_1,p_2,p_3,...$ form $t_k$?
There are multiple ways of representing one and the same number, say $23$ out of $2,3,7$ which makes this problem more convoluted?
(Higher math is totally acceptable approach, but if that is the way then at least I know it was more difficult than what I assessed at first.)
Thanks.
 A: I guess it must be too trivial for many, but instead of deleting this I will provide some clue to the answer.
Take the generating function for $\sum\limits_{k=1}^{m}a_k\omega_k$, at first take $\omega_k \in \mathbb{N}$
$$P(x)=\prod_{k=1}^{m}\frac{1}{1-x^{\omega_k}}$$
Now the $n$-th coefficient is simply
$$b_n=\frac{1}{n!}\frac{\mathrm{d}^n P(x)}{\mathrm{d} x^n} (0)$$
and this one is determining the number of representations of partial partition of n using only $\omega_k$'s.
Meaning:
$$S(N)=\sum_{n=0}^{N} \frac{1}{n!}\frac{\mathrm{d}^n P(x)}{\mathrm{d} x^n} (0)$$
is deciding about the number of solutions up to $N$.
This gives for example a cool formula:
$$S(N)=\frac{1}{2\pi i}\oint\limits_{\gamma} \frac{P(z)}{z-1} \left ( 1-\frac{1}{z^{N+1}} \right ) dz$$
where $\gamma$ is a circle around the origin in our case we need to have a radius less than $1$.
Inverting it we have got the function of the $n$-th element
$$F(n) = S^{(-1)}(n)$$
As we said, by changing $\omega_k$'s by a very small amount we will become able to distinguish equal values as they will set each other apart by a little. As we can vary $\omega_k$'s we can detect which solution has a multiple of which $\omega_k$.
So the entire trick is in smartly extending $S(N)$ to real values. Having $S^{(-1)}(n)$ can help to decide the group where we can find the $n$-th term, as in case of an integer there are many possible partitioning.
Now if we know that it is $S(N)$ we create
$$G(N, \omega_k)=S(N)-S(N-1)$$
extracting the group that gives the partial partition of $N$, knowing that our $n$-the term is there.
By creating a small variation on $\omega_k$ we can easily split, have the terms sorted and in the end decide the content of one particular selected term. This step is ambiguous as it all depends on the sorting system that we have selected.
