Saturday 26 February 2022

Another Prime Generating Polynomial

 I've posted about prime generating polynomials before, specifically:

In that first post, I included a table taken from MathWorld of the most impressive prime producing polynomials (not necessarily linear or quadratic). See Figure 1.


Figure 1

However, in that table, there's no mention of the fairly impressive prime producing polynomial that generates the sequence of number for OEIS A218456:


 A218456

\(2n^3 - 313n^2 + 6823n - 13633\)                                                                       


In the range of values for \(n\) from -8 to 102, it produces 90 primes out of the 110 numbers constituting an impressive 81.8% of the range. My attention was drawn to this polynomial because the number associated with my diurnal age today (26627) is a prime and a member of this sequence (when \(n\)=12). 

The initial members are:

-13633, -7121, -1223, 4073, 8779, 12907, 16469, 19477, 21943, 23879, 25297, 26209, 26627, 26563, 26029, 25037, 23599, 21727, 19433, 16729, 13627, 10139, 6277, 2053, -2521, -7433, -12671, -18223, -24077, -30221, -36643, -43331, -50273, -57457

Notice that some values are negative so we are considering absolute values here and ignoring the sign. The members of the sequence can be prime or composite. Figure 2 shows a plot of the prime values of the polynomial in the range from -8 to 102. I've chosen this range because values of -9 and 103 produce composite numbers.


Figure 2

The minimum prime produced in the range is 1223 and the maximum is 477551. The polynomial is cubic and Figure 3 shows what it looks like (courtesy of GeoGebra) and it can be seen that most of the values in the range are negative.


Figure 3

However, given that we are  only interested in positive values then the graph of \(y=|2n^3 - 313n^2 + 6823n - 13633|\) is as shown in Figure 4 and reflects what is shown in Figure 1.


Figure 4

Interestingly, 26627 is also a member of another sequence produced by a prime generating polynomial viz. OEIS 


 A320772

Prime generating polynomial: a(\(n\)) = \( (4n - 29)^2 + 58\)                                  
   

The initial members of the sequence are:

683, 499, 347, 227, 139, 83, 59, 67, 107, 179, 283, 419, 587, 787, 1019, 1283, 1579, 1907, 2267, 2659, 3083, 3539, 4027, 4547, 5099, 5683, 6299, 6947, 7627, 8339, 9083, 9859, 10667, 11507, 12379, 13283, 14219, 15187, 16187, 17219, 18283, 19379, 20507, 21667, 22859, 24083, 25339, 26627, 27947

This quadratic polynomial generates 28 distinct primes in succession from \(n\)=1 to 28. 26627 is generated by \(n\)=48. This polynomial is not listed in the table shown in Figure 1. The minimum prime is 59 and maximum is 6947. The graph of the quadratic lies completely above the \(x\) axis so all values generated are positive.

Figure 5 shows the numbers that are generated in the range from -8 to 102 (the same range as for the previous cubic polynomial). As the values exceed 28, it can be seen that the number of primes generated decreases. Overall, the density of primes in the range is 65.5% or 72 out of 110.                        


Figure 5

No comments:

Post a Comment