a(n) is 6n if n is odd and 4n if n is even. This is because the groups involved are C(n) X S3 if n is odd, where S3 is the symmetric group of order 6, and C(n/2) X D8 if n is even, where D8 is the dihedral group of order 8 and C(m) is the cyclic group of order m.