my $tab = "\t";
my $LF = "\n";
my $genome_size = 2000000;
my $read_size = 500;
my $coverage = 1;
my $reads = ($genome_size * $coverage)/$read_size;
my $p = $read_size/$genome_size;
print ((1 - $p)**$reads, $tab, log((1 - $p)*$reads), $LF);

foreach $coverage (1 .. 20) {
  $reads = ($genome_size * $coverage)/$read_size;
  my $total_p = 1 - (1 - $p)**$reads;
  my $total_nucs = $total_p * $genome_size;
  print ($coverage, $tab, $total_p, $tab, $total_nucs,$LF);}