How does atomic number affect ionization energy?
The pattern is a complex one, and needs to be broken down to consider its contributing factors. Here's a graph of the first ionisation energy of atoms vs. atomic number:
Firstly, across a period the ionisation energy generally increases. This is due to the outer shell electron which is being removed being more strongly attracted to the nucleus as we go across the period, hence more energy required to remove it. This stronger attraction arises from the increasing number of protons in the nucleus, which also results in the outer shell electrons being progressively closer to the nucleus. The shielding from filled inner shells remains the same across a period.
Secondly, when we get to the end of a period and ionise the first element in the next period down, we see a large decrease in ionisation energy. This is due to there being one more electron shell, so the outer shell is further from the nucleus and also experiences more shielding from filled inner shells, despite the extra proton in the nucleus.
Finally, within the generally-increasing trend across a period, we see small decreases in ionisation energy when we go from the electron being removed from an s-subshell (Group 2) to being removed from an p-subshell (Group 3). The p-subshell is slightly higher in energy, so less energy is required to remove the electron.
A similar dip in ionisation energy also occurs between Period 5 and Period 6. In period 5 each of the orbitals in the p-subshell is singly-filled. In period 6 the electron is being removed from a doubly-filled orbital, and repulsion between the two electrons in the orbital make it a little easier to remove one of them.