There is a mathematical reason that codons are four. The alphabet this code produces has 64 permutations. 64 is a special number, the lowest number which is 4^3 or 2^6 which means that it can be transformed from two dimensional to three dimensional and not lose any information. This is the minimum number for which this is true. Thus it is a mathematically singular point in the number series of information transformation efficiency.
In comments I have been asked to elaborate.
4x4x4 is a cube. (2x2x2)x(2x2x2)=8×8 is a flat matrix with 64 squares like a chess board.
4 codons ^ 3 places in the DNA string = 64 information units.
But the real secret here is the fact that this structure is reversible and substitutable without change and that is why there are 20 codons. If you reverse the codon sequences of three of if you substitute the two pairs of bases for each other then it does not change the fact that there are 20 sources 8×2 and 12×4. You get this by substituting yin for yang and reversing the hexagrams. This leads to 20 groups of hexagrams that are impervious to these changes. This makes DNA a code impervious to change based on direction and substitution and explains why there are exactly 20 amino acids. But because it is a code it has start and stop codons and so the mapping is not perfect between the reversable/substitutable case and the actual assignment of codons to amino acids but it is close. There are several codon mappings to the Amino Acids and to the start and stop codons and they have an interesting pattern and development. See the following for some of the most interesting research on Amino Acid to Codon mappings which finds that the mappings are not random as they have been previously portrayed.
1) Petoukhov S.V. & He M. Symmetrical Analysis Techniques for Genetic Systems and
Bioinformatics: Advanced Patterns and Applications. 2010, Hershey, USA: IGI Global. 271 p. (this book has a special section about I Ching and the genetic code!).
2) He M., Petoukhov S.V. Mathematics of bioinformatics: theory, practice, and applications. USA: John Wiley & Sons, Inc., 295 p. (I attach the cover of this book with symbols from I Ching!).
Articles on the site http://arxiv.org/ :
1. Petoukhov S.V. (2008b) The degeneracy of the genetic code and Hadamard matrices. 1-8. Retrieved February 22, 2008, from http://arXiv:0802.3366
2. Petoukhov S.V. (2008c) Matrix genetics, part 1: permutations of positions in triplets and
symmetries of genetic matrices. 1-12. Retrieved March 06, 2008, from http://arXiv:0803.0888. (версия 2 послана 29 марта 2010 года и находится на http://arxiv.org/abs/0803.0888v2 )
3. Petoukhov, S.V. (2008d). Matrix genetics, part 2: the degeneracy of the genetic code and the octave algebra with two quasi-real units (the “Yin-Yang octave algebra”). 1-23. Retrieved March 23, 2008, from http://arXiv:0803.3330.
4. Petoukhov, S.V. (2008e). Matrix genetics, part 3: the evolution of the genetic code from the
viewpoint of the genetic octave Yin-Yang-algebra. 1-22. Retrieved May 30, 2008, from http:// arXiv:0805.4692
5. Petoukhov, S.V. (2008f). Matrix genetics, part 4: cyclic changes of the genetic 8-dimensional Yin-Yang-algebras and the algebraic models of physiological cycles. 1-22. Retrieved September 17, 2008, from http://arXiv:0809.2714
6. S.Petoukhov (2010). Matrix genetics, part 5: genetic projection operators and direct sums. May 18, 2010, from http://arXiv:1005.5101v1
One way to think about this is through the game of Chess. I believe that the Game of Chess is right at this boundary where there is efficient information transformation between dimensions. A Chess board is two dimensional with 64 squares 8×8. When I analyze the pieces in chess I get the same amount of information in the pieces that exist in the chess board. Thus each side contains differentiated forms of embodied information that completely map to the chess board. This is why there is conflict, both sides are complete mappings of the territory under contention.I will leave it as an exercise to the student to prove or disprove this claim. I don’t have my analysis anymore and so I would have to do it all over to prove that what I am saying is correct, and I don’t have time to do that right now. But if it is true as I claim, then a lot flows form this. The game gets is perfect form from its being right on the boundary between two and three dimensions and embodying the transform between them in the board and pieces. Because of this efficiency of transformation the minds of the two players when immersed in the game are interacting right at this threshold of efficiency and effectiveness of information transformation, and are thus able to communicate semiotic-ally within the game very effectively. This combination of efficiency and effectiveness I call efficacious. Chess is an extremely efficacious symbolic communication system.
Now the DNA and RNA of the cell is taking advantage of exactly the same mathematical singularity where there is transformation between dimensions without data loss. This is one of the reasons that replication in life is so efficient. In this case we are going from the coded strand to the three dimensional molecule via the copying mechanism in RNA. But the fact this dimensional transformation of the information can be done at this singularity of perfect transformation means that there is no re coding involved. We can see this in magic squares and cubes of order 64. The magic square to cube mapping by the numbers allows us to see how all the numbers are distributed in each with no gaps or re-categorization necessary
Another example of this structure at the social level is the I Ching and its place in Ancient China as a core text by which all changes were seen as part of a per-mutational system exactly at this threshold. It is fascinating to think that both the west and the east had cultural artifacts poised at this threshold of efficient communication. In one civilization it was a game and in the other an oracular system given philosophical significance.