Problems & Puzzles: Puzzles

Puzzle 232. Primes and Cubic polynomials

Sebastian Martín Ruiz and myself started studying a few days ago the cubic polynomials f(x) =a.x^3+b.x^2+c.x+d, looking for those producing only primes in the x range [0, k]. As it has been usual, we studied this property simultaneously in f(x) and in abs(f(x)).

In the Ribenboim well know book we found two polynomials reported by Goetgheluck, and our first purpose was to find out if their productivity could be improved.

The Goetgheluck's polynomials and our own better results can be seen in the Table below.

Regarding the primes produced by each polynomial we report the total primes (T), their subdivision into negative (N) and positive (P) ones, and also  the quantity of distinct (D) primes found in the total primes. 

As you can see CR found (unexpectedly soon) a polynomial that produced more total and distinct, moreover only positive, primes than the produced by Goetgheluck.

A few days later SMR found another polynomial clearly superior to the Goetgheluck's one and to the CR's one except that the SMR's one contains some -let's say this way - some 'negative primes' while the CR's one doesn't.

A fast comparison between the CR & SMR polynomials and the champion quadratic well known polynomials (by Euler and Ruby) shows that the Euler's one is superior to the CR's one by far; while the SMR's polynomial is better than the Ruby's one in total primes (47 vs. 45) but inferior in distinct primes (43 vs. 45).

      Primes    
a b c d T N P D Author Comment
1 -34 381 -1511 26 17 9 24 Goetgheluck Cfr. P. 203, Ribenboim
2 -45 331 -3191 26 19 7 24 Goetgheluck Cfr. P. 203, Ribenboim
1 -35 308 73 29 0 29 25 CR More only positive
3 -183 3318 -18757 47 32 15 43 SMR More total primes and more distinct primes
                 
0 1 1 41 40 0 40 40 Euler Cfr. P. 200, Ribenboim
0 36 -810 2753 45 14 31 45 Ruby Cfr. P. 203, Ribenboim

Question:

1. Find better cubic polynomials than the CR & SMR ones


Solution:

Adam Stinchcombe and Faride Firoozbakht sent some interesting polynomials related to the only question of this puzzle. While Sebastián Martín Ruiz found another interesting quadratic polynomial that matches to the Euler's one in certain aspects.

***

Adam Stinchcombe:

A slight improvement over CR in the distinct column is 20*x^3-683*x^2+7553*x-26881 produces only distinct primes numbering D=26, but some negatives, N=11 and P=15...

I also get
 
poly                                  n               p                 d

x^3-43*x^2+572*x-2143      7              23                26
x^3-43*x^2+654*x-3701     19             12                31
x^3-48*x^2+629*x-1213      3              27                26
x^3-44*x^2+563*x-1811     11             19                26
x^3-44*x^2+601*x-2341      7              21                24
 
and a couple more that are equally lackluster, no where near the SMR one.  Hopefully, I can improve on these over the next couple of weeks.

 

(Note: I have replied to him that the very core of my polynomial is that N=0)

***

Faride Firoozbakht:

a) f(x)=x^3-65x^2+908x-617

a b c d T N P D Comment

1 -65 908 -617 31 12 19 30 one prime is repeated and only two times (T-D=1)

Question.1: Find cubic polynomials such that T > 30 and D = T.
Question.2: Find another cubic polynomial such that T > 30 and D = T-1.

In each of the two polynomials (of CR & SMR) two primes is repeated and each of them is repeated three times (T-D=2(3-1)). In the first polynomial of Goetgheluck one prime is repeated three times (T-D=2).In the second polynomial of Goetgheluck two primes is repeated (each of them is repeated two times (T-D=2(2-1)).

...

b) Note that in cubic polynomial that is found by you ,if we replace x by x-6 we obtain the polynomial x^3-53x+836-3251 which is prime for x=0,...,34 (for x=0,...,5 the terms are negative) .For this polynomial we have :

a b c d T N P D

1 -53 836 -3251 35 6 29 31

c) I found another cubic polynomials which for them 29 < T < 45 and T-D=4. 

***

Sebastián Martín Ruiz found a quadratic polynomial that has 40 distinct and positive primes matching the Euler's one in productivity but using non-unitary coefficients. He also observes that both polynomials share in a very peculiar manner 27 of the 40 primes. Here goes in short his discoveries:

a) The polynomials:

P(n)=9n2-231n+1523 (SMR)
Q(n)=n2+n+41 (Euler)

b) The properties

b.1) Both generate 40 primes distinct and positive (for n=0 to 39).

b.2) P(n) & Q(n) share 27 primes according to this equations:

P(n)=Q(38-3n) for n=0,1,...,12
P(n)=Q(3n-39) for n=13,14,...,26

This adds two interesting questions to this puzzle:

2. Can you find another quadratic polynomial with the same or better productivity of primes distinct and all positive, than the Euler and SMR ones?

3. Regarding the quadratic SMR's polynomial, can you explain or interpret the equations shown in b.2)?

***

Challenged by the Polynomial found by SMR, C. Rivera scanned a solid box of the coefficients for the quadratic polynomial f(x) = a.x2 - b.x + c, trying to find other polynomials as primes-productive (or better) than the Euler's one. This is what he found:

Constraints of the search

  • a, b & c are integers
  • a>0
  • f(x)>0 is prime for 0<=x<=k, x= integer
  • f(x) ≠ f(y) for x ≠ y (which means that for each polynomial the primes must be positive and distinct)

The before constraints imply the following simplifying conditions:

  • c=prime
  • b<2.isqrt(a.c), by calculus
  • a & b have the same parity.

My search/code scanned the following solid region:

  • 1<=a<=50
  • 3<=c<=99991
  • b<2.isqrt(a.c)

Results

For all the following six square polynomials each produces 40 positive and distinct primes for 0<=x<=39

Polynomial Author
e(x) = x2 + x + 41 Euler (?)
es(x) = x2 - 79.x + 1601 Escott (1899)
r1(x) = 4.x2 - 154.x + 1523 Rivera (2003)
r2(x) = 4.x2 - 158.x + 1601 Rivera (2003)
smr(x) = 9.x2 - 231.x + 1523 SMR (2003)
r3(x) = 9.x2 -471.x + 6203 Rivera (2003)
  • The first four polynomials (e, es, r1 & r2) all have the same primes, just in distinct order
  • The two last polynomials (smr, r3) have the same primes just in reverse order
  • The primes in es are in reverse order than in e
  • The primes in r2 are in reverse order than in r1
  • The primes in r3 are in reverse order than in smr; both share only 27 primes with the first four polynomials.
  • if x=x-40 in e you obtain es
  • if x=x-1/2 in r1 you obtain r2
  • if x=x-40/3 in smr you obtain r3
  • es(2.n)=r2(n), for 0<=n<=19; es(79-2.n)=r2(n), for 20<=n<=39

Conjecture: There is not any quadratic polynomial having positive and distinct primes for all x, 0<=x<=k, for k>39.

Question: Do you know if these six polynomials have beer reported together before?

***

Jon Wharf devised the analytic way these six polynomials are linked, so mystery solved...:

The Euler parabola equation is y = x.x+x+41
 
The es series samples the points on the parabola from -40 to -1. So in order to shift this series to occupy x=0 to 39, substitute (x-40) for x in the original equation:
x.x - 80x + 1600 + x - 40 + 41
 = x.x - 79x +1601
 
The r1 series samples every 2nd point starting at x = -39. Substitute (2x-39) for x in the Euler equation:
4x.x - 156x + 1521 + 2x - 39 + 41
 = 4x.x - 154x + 1523
 
The r2 series samples every 2nd point starting at x = -40. Substitute (2x-40) for x in the Euler equation:
4x.x - 160x + 1600 + 2x - 40 + 41
 = 4x.x - 158x + 1601
 
The smr series samples every 3rd point starting at x = -39. Substitute (3x-39) for x in the Euler equation:
9x.x - 234x + 1521 + 3x - 39 + 41
 = 9x.x - 231x + 1523
 
The r3 series samples every 3rd point starting at x = -79. Substitute (3x-79) for x in the Euler equation:
9x.x - 474x + 6241 + 3x - 79 + 41
 = 9x.x - 471x + 6203
 
You can also substitute so as to sample the Euler parabola "backwards" for all of these, for example substitute (39-x) for x to get es again. Same final equation in each case of course.

***

Seiji Tomita wrote (April 2005):

I found better polynomials than CR ones.

There are the polynomials with D>=30.


a b c d T N P D
2 -28 -2334 46153 36 0 36 36

2 -22 -2384 43793 35 0 35 35

2 -16 -2422 41389 34 0 34 34

2 -10 -2448 38953 33 0 33 33

2 -4 -2462 36497 32 0 32 32

2 2 -2464 34033 31 0 31 31

2 8 -2454 31573 30 0 30 30

***

Gobbo Franck wrote on Dec. 2005:

I just want indicate a new polynomial who is generating 62 prime numbers consecutively (for n=0 to n=61) :
8n˛ - 488n + 7243
This polynomial must be considered in absolute value.

Note : This polynomial generate 31 different primes (the first 31 numbers.

I found this polynomial on 12/27/2005

***

Franck Gobbo wrote (Janary, 2006):

I just want indicate a new cubic polynomial who is generating 47 prime numbers consecutively (for n=0 to n=46) :
3n^3 - 231n^2 + 5526n - 38651

In the 47 prime numbers generated :
P=32
N=15
Diff. = 43

I found this polynomial on 25/01/2006.

Later he added

I just want to add a precision about the cubic polynomial I discovered
P(n) = 3n^3 - 231n^2 + 5526n - 38651

This polynomial is linked with the S.M Ruiz cubic polynomial
K(n) = 3n^3 - 183n^2 + 3318n - 18757
as follow :

P(-n+46) = - K(n)
and
K(-n+46) = -P(n) (suggested by S.M Ruiz)

***

Parviz Afereidoon wrote:

I'm ms-student of ferdowsi university of mashhad _iran. Now I am researching about polynomials that have a long string of prime values and found the below

 

 Polynomials:
 
  f(x)=2x^3-212x^2+5778x-42841
 
( I found this polynomial on March 6, 2006 )
 

a b c d T N P D  

2  -212  5778  -42841  42  29  13  41

5  -185  1220   4157  40  14  26  36
 

I found another cubic polynomials which for them D>30.

***

Franck Gobbo comment about the last contribution is:

I want to add a precision about the cubic polynomial that Parviz Afereidoon discovered :

P(n) = 2n^3 - 212n^2 + 5778n - 42841

This polynomial is linked with a polynomial I discovered on January 2006 (I spoke about this polynomial in a mail to S.M Ruiz, February 23, 2006). This polynomial is the following :

G(n) = 2n^3 – 34n^2 – 1520n + 24473 (see my website)

And here is the link :

If F(n) = 2n^3 – 212n^2 + 5778n – 42841 (generating 42 prime numbers 0 -> 41), then -G(n) = F(-n+41) = -2n^3 + 34n^2 + 1520n - 24473, so
G(n) = 2n^3 – 34n^2 – 1520n + 24473 (generating 42 primes too, T=42 , P=29, N=13, D=42).

More generally (and for cubic polynomials) I would say that :

Let F(n) = (An^3-Bn^2+Cn-D) generating P successive prime numbers, then –G(n) = F(-n + (P-1)) and G(n) is generating P successive prime numbers too.Here are some others little results :

2n^3 - 113n^2 + 1967n – 9949  (T=39 P=25 N=14 Diff. = 38)
n^3 - 171n^2 + 5858n – 47711  (T=40 P=18 N=22 Diff. = 39)
2n^3 - 115n^2 + 2043n – 11369  (T=39 P=14 N=25 Diff. = 38)
4n^3 - 246n^2 + 4184n – 19913  (T=40 P=11 N=29 Diff. = 38)
8n^3 - 487n^2 + 9449n – 56813  (T=40 P=28 N=12 Diff. = 40)
2n^3 - 115n^2 + 2043n – 11369  (T=39 P=14 N=25 Diff. = 38)
5n^3 - 291n^2 + 5266n – 30347  (T=39 P=11 N=28 Diff. = 37)
5n^3 - 263n^2 + 4338n – 21841  (T=40 P=24 N=16 Diff. = 39)
6n^3 - 316n^2 + 5604n – 33811  (T=39 P=18 N=21 Diff. = 39)
5n^3 - 279n^2 + 4810n – 23917  (T=39 P=28 N=11 Diff. = 37)
8n^3 - 449n^2 + 7967n – 45523  (T=40 P=12 N=28 Diff. = 40)

***

On June 21, 06, J. C. Meyrignac reported this:

Following our programming contest http://www.recmath.org/contest/index.php

New records for N=3 (puzzle 232):

42.x^3 + 270.x^2 - 26436.x + 250703
gives 40 positive primes (discovered by Jaroslaw Wroblewski &
Jean-Charles Meyrignac)

- 66.x^3 + 3845.x^2 - 60897.x + 251831
abs() of this function gives 46 distinct primes (discovered by Ivan
Kazmenko & Vadim Trofimov)

BTW, Shyam Sunder Gupta found:
abs(1/4x5 - 133/4x4 + 6729/4x3 - 158379/4x2 + 860147/2x - 1705829)

which provides 57 primes !!!

1705829 1313701 991127 729173 519643 355049 228581 134077 65993 19373 10181 26539 33073 32687 27847 20611 12659 5323 383 3733 4259 1721 3923 12547 23887 37571 53149 70123 87977 106207 124351 142019 158923 174907 189977 204331 218389 232823 248587 266947 289511 318259 355573 404267 467617 549391 653879 785923 950947 1154987 1404721 1707499 2071373 2505127 3018307 3621251 4325119
 

***
 

 

 

 

 

 

 

 

 

 



Records   |  Conjectures  |  Problems  |  Puzzles