I'm looking for a proper way to sum each member of a group with each member of another group for two group or even more group of numbers , which does not have duplicate numbers , for example let's get this two group {0,2,4,6,8}+{0,1,2,3} which both have a relation in there members
$\{0,2,4,6,8\}=2k\quad $ for $\quad0\le$k$\le 4 $
$\{0,1,2,3\}=k\quad$ for $\quad0\le$k$\le 3 $
if we write them in row and column the sum of each one is
$0 \quad 2 \quad 4 \quad 6 \quad 8$
$1 \quad 3 \quad 5 \quad 7 \quad 9$
$2 \quad 4 \quad 6 \quad 8 \quad 10 $
$3 \quad 5 \quad 7 \quad 9 \quad 11$
so if we remove the duplicate ones we will have this finale group
$\{0,1,2,3,4,5,6,7,8,9,10,11\}=k \quad $ for $\quad0\le$k$\le 11 $
As we see in this case the result has a good form "1k" but it doesn't have a good form in every case .
for a bad form example
$\{0,2,4,6,8\}=2k\quad $ for $\quad0\le$k$\le 4 $
$\{0,3,6,9\}=3k\quad$ for $\quad0\le$k$\le 3 $
$0 \quad 2 \quad \;\,4 \quad\;\, 6 \quad\;\, 8$
$3 \quad 5 \quad \;\, 7 \quad \;\, 9 \quad\;\, 11$
$6 \quad 8 \quad \;\, 10 \quad 12 \quad 14 $
$9 \quad 11 \quad 13 \quad 15 \quad 17$
as you see we can show
$\{2,3,4,5,6,7,8,9,10,11,12,13,14,15\}=1k\quad $ for $\quad2\le$k$\le 15 $
but we can not easily put 0 and 17 in the form of $1k$ or $nk$ so it's bad form and if we keep it like how it was is better than this.
I searched a lot base one my little knowledge for a way to sum more than two group like this and write result in best form .
pleas if you know a way in math that works on this stuff or any idea help . thanks
Suppose $a, b$ are integers. Then they will have a greatest common divisor (gcd) - the highest integer that divides both. Since $1$ divides all integers, the gcd will be $\ge 1$. If $p$ is the gcd of $a$ and $b$ ($p = \gcd(a,b)$), then for any integers $m, n$, we have that since $p$ divides $a$ ($p \mid a$) and $p \mid b$, it is also true that $p \mid ma + nb$. In particular, if $\frac ap = r, \frac bp = s$, then $\frac{ma + nb}p = mr + ns$. There is a famous theorem that goes the other way: The smallest positive value $ma + nb$ that can be produced by any integers $m, n$ (which may be negative) will be the gcd of $a, b$.
Your sets are of the form $\{ak : k_0 \le k \le k_1\}$ for some integers $k_0, k_1$. These are called "arithmetic sequences". And though you have upper and lower limits on the multipliers, let me drop those for a bit and talk about $\{am : m \in \Bbb Z\}$ and $\{bn : n \in \Bbb Z\}$ ($\Bbb Z$ is a common notation in mathematics for the set of all integers).
The sum of these two sets is $\{am + bn : m, n \in \Bbb Z\}$ (sets are not like lists - a number is either in the set or out of the set - it is not "in the set such and such times"; there is no such thing as multiple entries of the same number). By the result I showed, every member of this set is a multiple of $p = \gcd(a,b)$, and by the theorem, $p$ itself is also a member of this set: There are some integers $r,s$ such that $p = ra + sb$. But for any integer $k$ we then have $kp = (kr)a + (ks)b$, which means every multiple of $p$ is in the set. That is, this set is just the set of all multiples of $p$: $$\{am + bn : m, n \in \Bbb Z\} = \{kp : k \in \Bbb Z\}$$
This explains why in your two examples, the "form" for the sum set was $1k$. In your first example, $a = 2, b = 1$, and $1 = \gcd(2,1)$. In your second example $a = 2, b = 3$ and it is also true that $1 = \gcd(2,3)$. If you had chosen an example with $a = 4, b = 6$, you would have found that the middle entries of the sum would be consecutive even integers: $2 = \gcd(4,6)$, so the form for the sum set would be $2k$.
If you have more than two sets in the sum $\{am + bn + cq + dr + \cdots \mid m, n, q, r, \dots \in \Bbb Z\}$ then the "form" will be the gcd of all the numbers: If $p = \gcd(a,b,c,d,\dots)$ then the sum set is $\{kp \mid k \in \Bbb Z\}$.
But of course, you don't have all possible multiples of $a, b$ in your sets, just a finite number of them. This is why your "forms" are not perfect. All multiples of $p$ can be obtained by some set of multipliers of the individual forms, but that doesn't mean they can be formed using the ranges of multipliers you allow. So there are holes in sum sets. I suspect all of your good forms have $1k$ as one of the input sets. and the lower limit on $k$ will be either $0$ or $1$ ($-1$ would also work). This is why they are good. $1k$ doesn't skip over anything, so it fills in the gaps left over from the higher forms (this also assumes the upper limit on the $1k$ set is at least as large as the gcd of the other forms less $1$).