Electron shell occupancy for ions

The electron shell occupancy for an atom or monatomic ion is one way of showing the arrangement of electrons for that species.

The electron shell occupancy is represented by a sequence of numbers separated by commas.
The numbers give, in order of increasing energy, the number of electrons in the various energy levels (shells).

To generate the electron configuration for a monatomic ion:
Find the atomic number for the element.
This is the total number of electrons available.
The atomic number for aluminium is 13.
Thus the total number of electrons available is 13.
The atomic number of fluorine is 9.
Thus the total number of electrons available is 9.

Adjust the number of electrons in accordance with the charge on the ion.
Cations have fewer electrons. 
Al3+ has 10 electrons.
Anions have more electrons.
F has 10 electrons.
1 2
  1H 2He
3 Li 4 Be   5 B 6 C 7 N 8 O 9 F 10 Ne
11 Na 12 Mg 13 Al 14 Si 15 P 16 S 17 Cl 18 Ar
19 K 20 Ca 21 Sc 22 Ti 23 V 24 Cr 25 Mn 26 Fe 27 Co 28 Ni 29 Cu 30 Zn 31 Ga 32 Ge 33 As 34 Se 35 Br 36 Kr
37 Rb 38 Sr 39 Y 40 Zr 41 Nb 42 Mo 43 Tc 44 Ru 45 Rh 46 Pd 47 Ag 48 Cd 49 In 50 Sn 51 Sb 52 Te 53 I 54 Xe
55 Cs 56 Ba 71 Lu 72 Hf 73 Ta 74 W 75 Re 76 Os 77 Ir 78 Pt 79 Au 80 Hg 81 Tl 82 Pb 83 Bi 84 Po 85 At

.

Fill the energy levels (shells) in order of increasing energy, taking into account the maximum occupancies given below.
Energy level 1 (shell 1): 2 electrons
Energy level 2 (shell 2): 8 electrons
Energy level 3 (shell 3): 8 electrons*
*For elements of atomic number > 20, energy level 3 may contain up to 18 electrons.

The sum of the numbers of electrons in the various energy levels should equal the number of electrons available.
For the first 20 elements
monatomic cations have one fewer energy level (shell) occupied than the corresponding atom.
The electron configuration of Al is 2,8,3; the configuration fof Al3+ is 2,8.
monatomic anions have the added electrons in the same outermost energy level (shell) as the corresponding atom.
The electron configuration of F is 2,7; the configuration for F is 2,8.