Answer:
Below are some patterns in the charge for elements in each group.
Group 1 elements : 1 valence electron and form ions with charge +1
Group 2 elements : 2 valence electrons and form ions with charge + 2
Group 3 elements : 3 valence electrons and form ions with charge + 3(there are some exceptions as well)
Elements in groups 4 and 5 are unpredictable also the D block elements consist of multiple oxidation states..
Group 6 elements : 6 valence electrons, form ions with charge -2
Group 7 elements: 7 valence electrons, form ions with charge -1
The octet rule is being followed, the elements form either ionic bond or covalent bond to fulfill it.
eg: when a K atom forms a K+ ion, the ion has the same electron configuration as the noble gas Ar (argon).
When an O atom gains 2 electrons to form the O²⁻ ion, the ion has the same electron configuration as the noble gas Ne (neon).
Note: Boron (B) is in Group 3 but doesn't form ions.