$(a_n, b_n)$ are pairwise different pairs of numbers, where $1≤n$ $a_n$ and $b_n$ are positive integers. I am looking for the the formula for the Sum of $a_n$ and the Sum of $b_n$ where Sum of $a_n \times$ the Sum of $b_n$ is minimized. The method for minimizing it obviously goes like this for $a_n,b_n$
1,1
1,2
2,1
2,2 and so on. Any help is appreciated.
First, let's codify your method. For a given $n$, let $n_1 = n$, and recursively define $$k_i = \lfloor \sqrt n\rfloor, n_{i+1} = n_i - k_i^2$$ until for some $m, n_{m+1} = 0$. Now for any $k, l$, define $$P(k,l) = \{(l + a, l+b) : 1 \le a \le k, 1 \le b \le k, (a,b) \in \Bbb N^2\}$$
Then the set of all pairs $(a_i, b_i)$ will be $$P_n = P(k_1, 0) \cup P(k_2, k_1) \cup P(k_3, k_1 + k_2) \cup \dots \cup P(k_m, k_1 + k_2+\dots + k_{m-1})$$
Now, $P(k, 0)$ has $k^2$ elements, and looking at the first coordinate only, we see that $k$ of them are $1$, $k$ are $2$, etc, so the sum of those first coordinates is $k(1 + 2 + ... + k) = k \binom k2$. $P(k, l)$ adds $l$ to every coordinate, so it has first coordinate sum $$s(k, l) = k\binom k2 + k^2l = k^2\left(\frac {k-1}2 + l\right)$$ Because $P_k(l)$ is symmetric (exchanging the order of every pair doesn't change the set), the second coordinate sum is exactly the same.
Finally $P_n$ has first coordinate sum and second coordinate sum both equal to $$s_n = \sum_{i=1}^m s\left(k_i, \sum_{j=1}^{i-1} k_j\right)$$
For example, if $n = 142$, we rewrite it as $$142 = 11^2 + 4^2 + 2^2 + 1^2$$ So $$P_{142} = P(11,0) \cup P(4,11) \cup P(2,15) \cup P(1,17)$$ and $$\begin{align}s_{142} &= s(11,0) + s(4,11) + s(2,15) + s(1,17)\\ &=11^2(5 + 0) + 4^2\left(\frac 32 + 11\right) + 2^2\left(\frac12 + 15\right) + 1^2(0 + 17)\\ &= 605 + 200 + 62 + 17\\ &= 884\end{align}$$
whose square is $781,456$.
The next couple cases are $$\begin{align}143 &= 11^2 + 4^2 + 2^2 + 1^2 + 1^2\\s_{143} &= s(11,0) + s(4,11) + s(2,15) + s(1,17) + s(1,18) = 902\end{align}$$ And $$\begin{align}144 &= 12^2\\s_{144} &= s(12,0) = 792\end{align}$$
I'm pretty sure this is the optimum solution, though I haven't proved it yet, and do not have time right now. So I could be wrong. But it seems likely to fall to an induction proof.