Primer Length
The optimum length of a primer depends upon its (A+T) content, and the Tm of its partner if one runs the risk of having problems such as described above. Apart from the Tm, a prime consideration is that the primers should be complex enough so that the likelihood of annealing to sequences other than the chosen target is very low. (See hybridn.doc).
For example, there is a ¼ chance (4-1) of finding an A, G, C or T in any given DNA sequence; there is a 1/16 chance (4-2) of finding any dinucleotide sequence (eg. AG); a 1/256 chance of finding a given 4-base sequence. Thus, a sixteen base sequence will statistically be present only once in every 416 bases (=4 294 967 296, or 4 billion): this is about the size of the human or maize genome, and 1000x greater than the genome size of E. coli. Thus, the association of a greater-than-17-base oligonucleotide with its target sequence is an extremely sequence-specific process, far more so than the specificity of monoclonal antibodies in binding to specific antigenic determinants. Consequently, 17-mer or longer primers are routinely used for amplification from genomic DNA of animals and plants. Too long a primer length may mean that even high annealing temperatures are not enough to prevent mismatch pairing and non-specific priming.
Degenerate Primers
For amplification of cognate sequences from different organisms, or for "evolutionary PCR", one may increase the chances of getting product by designing "degenerate" primers: these would in fact be a set of primers which have a number of options at several positions in the sequence so as to allow annealing to and amplification of a variety of related sequences. For example, Compton (1990) describes using 14-mer primer sets with 4 and 5 degeneracies as forward and reverse primers, respectively, for the amplification of glycoprotein B (gB) from related herpesviruses. The reverse primer sequence was as follows:
TCGAATTCNCCYAAYTGNCCNT
where Y = T + C, and N = A + G + C + T, and the 8-base 5'-terminal extension comprises a EcoRI site (underlined) and flanking spacer to ensure the restriction enzyme can cut the product (the New England Biolabs catalogue gives a good list of which enzymes require how long a flanking sequence in order to cut stub ends). Degeneracies obviously reduce the specificity of the primer(s), meaning mismatch opportunities are greater, and background noise increases; also, increased degeneracy means concentration of the individual primers decreases; thus, greater than 512-fold degeneracy should be avoided. However, I have used primers with as high as 256- and 1024-fold degeneracy for the successful amplification and subsequent direct sequencing of a wide range of Mastreviruses against a background of maize genomic DNA (Rybicki and Hughes, 1990).
Primer sequences were derived from multiple sequence alignments; the mismatch positions were used as 4-base degeneracies for the primers (shown as stars; 5 in F and 4 in R), as shown above. Despite their degeneracy, the primers could be used to amplify a 250 bp sequence from viruses differing in sequence by as much as 50% over the target sequence, and 60% overall. They could also be used to very sensitively detect the presence of Maize streak virus DNA against a background of maize genomic DNA, at dilutions as low as 1/109 infected sap / healthy sap (see below).

