Are the formula and its application correct?
Your formula is correct, and Vadim gives a good discussion of the underlying theory. However, concerning your application...
Looks to me, that the primer should not occur at all in the E. coli genome.
This is the point of primers -- because of their length, they are unlikely to occur at random in a given DNA sequence. So, starting with a known DNA sequence, you can create a primer that matches that sequence and have good confidence that you are not getting off-target priming, which may give you false-positive amplification in PCR. This is precisely what the authors do in your linked paper.1 Using the known sequences for Rfb and SLT-1 genes in E. coli O157:H7, the authors make primers for the specific detection of those genes in drinking water, and, by extension, the presence of the organism that harbors those genes.
- Bonetta S, Borelli E, Bonetta S, Conio O, Palumbo F, Carraro E. Development of a PCR protocol for the detection of Escherichia coli O157:H7 and Salmonella spp. in surface water. Environ Monit Assess. 2011 Jun;177(1-4):493-503.