The Polynomial

P(n) = n^4 − 106n^3 + 3959n^2 − 60950n + 341227
L = 54

This monic quartic polynomial generates 54 consecutive prime values in canonical form, i.e. for n = 0,1,…,53. The run stops because P(54) is composite.

Termination

P(54) = 406243 (composite).

Remark on repeated values

The prime 26731 appears twice in the sequence. This is allowed: consecutive prime generation concerns the primality of each value P(n) for consecutive integers n, not the distinctness of the prime values.

Prime Sequence (n = 0..53)

The 54 consecutive prime values generated by P(n) in canonical form:

341227, 284131, 234331, 191227, 154243, 122827, 96451, 74611, 56827, 42643,
31627, 23371, 17491, 13627, 11443, 10627, 10891, 11971, 13627, 15643,
17827, 20011, 22051, 23827, 25243, 26227, 26731, 26731, 26227, 25243,
23827, 22051, 20011, 17827, 15643, 13627, 11971, 10891, 10627, 11443,
13627, 17491, 23371, 31627, 42643, 56827, 74611, 96451, 122827, 154243,
191227, 234331, 284131, 341227
  

Note: the prime 26731 appears twice. Consecutive prime generation concerns primality of each indexed value, not distinctness.

Translation Genealogy (L = 47 → 54)

The record polynomial belongs to a translation orbit under the shift n → n − 1. The chain below shows consecutive descendants in the same orbit.

Run (L) Monic quartic polynomial
54n^4 − 106n^3 + 3959n^2 − 60950n + 341227
53n^4 − 102n^3 + 3647n^2 − 53346n + 284131
52n^4 − 98n^3 + 3347n^2 − 46354n + 234331
51n^4 − 94n^3 + 3059n^2 − 39950n + 191227
50n^4 − 90n^3 + 2783n^2 − 34110n + 154243
49n^4 − 86n^3 + 2519n^2 − 28810n + 122827
48n^4 − 82n^3 + 2267n^2 − 24026n + 96451
47n^4 − 78n^3 + 2027n^2 − 19734n + 74611

Centered representative (same translation orbit)

One convenient representative in the same orbit is obtained by the shift Q(n) = P(n + 26):

Q(n) = n^4 − 2n^3 − 253n^2 + 254n + 26731

In canonical form, this centered representative yields 28 consecutive primes (n = 0..27).

Reproducibility

PARI/GP

P(n)=n^4-106*n^3+3959*n^2-60950*n+341227;
for(n=0,200,
  if(!isprime(abs(P(n))),
    print("STOP n=",n,"  P(n)=",abs(P(n)),"  fact=",factor(abs(P(n))));
    break
  )
);

SageMath / SageCell

def P(n):
    return n^4 - 106*n^3 + 3959*n^2 - 60950*n + 341227

for n in range(0, 200):
    v = abs(P(n))
    if not is_prime(v):
        print("STOP n =", n, " P(n) =", v, " factor =", factor(v))
        break