A212325 Prime-generating polynomial: a(n) = n^2 + 3*n - 167.
-167, -163, -157, -149, -139, -127, -113, -97, -79, -59, -37, -13, 13, 41, 71, 103, 137, 173, 211, 251, 293, 337, 383, 431, 481, 533, 587, 643, 701, 761, 823, 887, 953, 1021, 1091, 1163, 1237, 1313, 1391, 1471, 1553, 1637, 1723, 1811, 1901, 1993, 2087, 2183, 2281, 2381
Offset: 0
Links
- Bruno Berselli, Table of n, a(n) for n = 0..1000
- Eric Weisstein's World of Mathematics, Prime-Generating Polynomial.
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Crossrefs
Programs
-
Magma
[n^2+3*n-167: n in [0..47]]; // Bruno Berselli, May 18 2012
-
Mathematica
Table[n^2+3n-167,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{-167,-163,-157},50] (* Harvey P. Dale, Feb 08 2020 *)
-
PARI
Vec((-167+338*x-169*x^2)/(1-x)^3+O(x^99)) \\ Charles R Greathouse IV, Oct 01 2012
-
PARI
apply( {A212325(n)=(n+3)*n-167}, [0..55]) \\ M. F. Hasler, Feb 11 2025
-
Python
def A212325(n=None, upto=None): return(A212325(i)for i in range(n or 0, upto or 2**63)) if upto or n is None else(n+3)*n-167 # M. F. Hasler, Feb 11 2025
Formula
G.f.: (-167 + 338*x - 169x^2)/(1-x)^3. - Bruno Berselli, May 18 2012
From Elmo R. Oliveira, Feb 10 2025: (Start)
E.g.f.: exp(x)*(-167 + 4*x + x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
Extensions
Edited by Bruno Berselli, May 18 2012
Comments