OFFSET
0,1
REFERENCES
A prime-generating quadratic: the absolute values are primes for 0 <= n <= 39.
LINKS
Eric Weisstein's World of Mathematics, Prime-Generating Polynomial.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 111*n^2 - 3123*n + 10753.
G.f.: -(13987*x^2-24518*x+10753)/(x-1)^3. - Colin Barker, Feb 16 2013
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: exp(x)*(10753 - 3012*x + 111*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
MAPLE
proc(i)
local a, n;
for n from 0 to i do a:=111*n^2-3123*n+10753; if isprime(abs(a)) then
print(a); fi; od; end:
MATHEMATICA
Table[111n^2 - 3123n + 10753, {n, 0, 39}] (* Alonso del Arte, Feb 13 2013 *)
LinearRecurrence[{3, -3, 1}, {10753, 7741, 4951}, 40] (* Harvey P. Dale, Dec 04 2015 *)
PROG
(PARI) a(n)=111*n^2-3123*n+10753 \\ Charles R Greathouse IV, Feb 12 2013
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Yusuf Z Gurtas, Feb 10 2013
STATUS
approved