I am currently using a non-systematic, pseudo-random method for finding prime-generating polynomials, based on the [Bateman-Horn method](https://dl.dropboxusercontent.com/u/5188175/BatemanHorn.pdf) for finding likely candidates, and then narrowing down. I have been so far, only searching for quadratics, searching up to a depth of only $10$ primes initially with values over $3$, and then refining. I have then been using the quadratic patterns from [here](http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html) with coefficient patterns $+,-,+$ as per the records published therein.


However, I have only been getting max $28$ prime-runs (aside from the expected longer runs associated with the Heegner numbers), searching $10^5$ interations, and then up to $10^6$ $n$ for each quadratic (which is no doubt the downfall, since the resultant runs appear to increase (as expected) the higher the search limit.


Is a more systematic approach more likely to reap better results, or is there a far more efficient method for searching?


*eg* [MMA code](https://github.com/martinq321/primepoly/blob/master/mma) *thanks largely to @IgorRivin's answer [here](https://mathoverflow.net/a/214726/45057)*


*Implemeted in stages (eg):*



```
search2[-1, -1, -1]

Most@# & /@ %

With[{a = %}, {hhh[#] & /@ a, searchpt2[#] & /@ a}]

Flatten[Rest@# & /@ %[[2]]]

vv@# & /@ %

```


Methods for searching for prime generating polynomials
Another approach is to maximize to constant $C$ in
[Bateman–Horn conjecture](https://en.wikipedia.org/wiki/Bateman%E2%80%93Horn_conjecture)


The constant is:


$$C = \prod\_p \frac{1-N(p)/p}{(1-1/p)}$$


For linear $f(x)$, you can make it unbounded rational.


Let $n\#$ denote primorial, the product of the first $n$
primes.


Let $f\_n=n\#x \pm 1$.


$N(p)$ is the number of roots modulo $p$ without multiplicities.


For $p=p\_k, k > n$, $N(p)=1$ which makes the term one, so large
primes don't change the product.


For $p=p\_k, k \le n, N(p)=0$ and the term is $\frac{p}{p-1}$.


The product up to $p\_n$ is about $\log{p\_n}$ which
is unbounded.


For more information about the constant, check @Igor's paper
[Some experiments on Bateman-Horn](http://arxiv.org/abs/1508.07821)


