Function to calculate the electron configuration of an element given its atomic number