```Date: Oct 1, 2017 11:46 AM
Author: David Bernier
Subject: Prime mystery in Euler's polynomial P(k) := k^2 -k + 41

gg(X):= X^2+X+41gg(.) is Euler's prime-generating polynomial:up to a simple change of variable (unit-shift).almost, i.e.gg(Q-1) = Q^2 - Q + 41 , [ Euler's polynomial in Q ].which is of the same form as Euler's k^2 - k + 41from Euler's Lucky numbers:< https://en.wikipedia.org/wiki/Lucky_numbers_of_Euler > .Modulo 41, two residue classes , k == 0 (mod 41)and  k == 1 (mod 41) yield a k^2 - k + 41 == 0 (mod 41).If k > 40, and either k == 0 or k == 1 (mod 41), then41 divides k^2 -k +1, and this last number is nota prime.There remain 39 residue classes modulo 41 which aren'tforbidden from producing primes, when k > 40.For "large" swaths of consecutive integers,I tested candidates, where a candidate,in terms of Euler's P(k) = k^2 - k+1,is a k>40 with k =/= 0 , k =/= 1 (modulo 41).These candidates are not divisible by 41.If K^2 - K +1 is prime, I give it a weightof log(K^2 - K +1).Then, I look at the sum of the weights ofthe primes of the form: k^2 - k+1,and the number of candidates, for kin a large range of consecutive integers[ a, b].I calculate the quotient:  (sum of weights of primes)/(number of candidates),for large intervals [a, b].This quotient approaches 6.98 over ranges [a, b]that include thousands to millions of candidatesthat are in fact probable primes (pseudoprimes).Example:For the range[ 3,000,000,001 ... 4,000,000,000]there are:951,219,512 candidates X such thatX^2+X+41 =/= 0 (mod 41)and there are:151,101,437 pseudoprimes (probable primes),and the weight of the probable primes is6,640,090,792.4and weight/candidates ~= 6.98 .I looked for patterns in prime factors of  x^2 + x + 41, when x^2 + x + 41 is composite,and found no pattern. [ equivalently, poly. k^2 - k + 41 ].So I'm puzzled as to why this 6.98 ~= 7 persists,even with x (or k) into a few billions.Could it all be explained byco-primeness to the primes from 2 to 37 inclusive?Mystified,David Bernier---------------------------------------------------------------? K=0  = 0for(D=3,10, summ = 0.0; count=0; np=0;     for(Z=K+1,K+10^D,bb=gg(Z);          if((bb%41)>0,count=count+1;             if(ispseudoprime(bb),np=np+1;summ=summ+log(bb))));     print(D,"   ",count,"  ",np,"  ",summ/count)  )3   952  581  7.0114   9514  4148  7.0225   95122  31984  6.9876   951220  261080  6.981----------------------------------------------------------? K  = 1000000000for(D=3,10, summ = 0.0;count=0;np=0;     for(Z=K+1,K+10^D,bb=gg(Z);          if((bb%41)>0,count=count+1;              if(ispseudoprime(bb),np=np+1;summ=summ+log(bb))));     print(D,"   ",count,"  ",np,"  ",summ/count)  )3   950  159  6.9364   9512  1625  7.085   95122  16083  7.0076   951218  160439  6.990--------------------------------------------------------? K = K + 10^9= 2000000000for(D=3,10, summ = 0.0;count=0;np=0;     for(Z=K+1,K+10^D,bb=gg(Z);          if((bb%41)>0,count=count+1;             if(ispseudoprime(bb),np=np+1;summ=summ+log(bb))));     print(D,"   ",count,"  ",np,"  ",summ/count)  )3   950  166  7.484   9512  1477  6.655   95122  15499  6.9796   951218  154943  6.9777   9512194  1549537  6.978------------------------------------------------------? K = K + 10^9  = 3000000000for(D=3,10, summ = 0.0;count=0;np=0;     for(Z=K+1,K+10^D,bb=gg(Z);          if((bb%41)>0,count=count+1;             if(ispseudoprime(bb),np=np+1;summ=summ+log(bb))));     print(D,"   ",count,"  ",np,"  ",summ/count)  )3   950  145  6.664   9512  1530  7.025   95122  15287  7.016   951220  152132  6.987   9512194  1,521,757  6.988   95121950  15,202,323  6.989   951,219,512  151,101,437  6.98-----------------------------------------------------------
```