login
a(n) = 111*n^2 - 3123*n + 10753.
0

%I #35 Oct 31 2024 13:38:24

%S 10753,7741,4951,2383,37,-2087,-3989,-5669,-7127,-8363,-9377,-10169,

%T -10739,-11087,-11213,-11117,-10799,-10259,-9497,-8513,-7307,-5879,

%U -4229,-2357,-263,2053,4591,7351,10333,13537,16963,20611,24481,28573,32887,37423,42181,47161,52363,57787

%N a(n) = 111*n^2 - 3123*n + 10753.

%D A prime-generating quadratic: the absolute values are primes for 0 <= n <= 39.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html">Prime-Generating Polynomial</a>.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F a(n) = 111*n^2 - 3123*n + 10753.

%F G.f.: -(13987*x^2-24518*x+10753)/(x-1)^3. - _Colin Barker_, Feb 16 2013

%F From _Elmo R. Oliveira_, Oct 31 2024: (Start)

%F E.g.f.: exp(x)*(10753 - 3012*x + 111*x^2).

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

%p proc(i)

%p local a, n;

%p for n from 0 to i do a:=111*n^2-3123*n+10753; if isprime(abs(a)) then

%p print(a); fi; od; end:

%t Table[111n^2 - 3123n + 10753, {n, 0, 39}] (* _Alonso del Arte_, Feb 13 2013 *)

%t LinearRecurrence[{3,-3,1},{10753,7741,4951},40] (* _Harvey P. Dale_, Dec 04 2015 *)

%o (PARI) a(n)=111*n^2-3123*n+10753 \\ _Charles R Greathouse IV_, Feb 12 2013

%Y Cf. A005846, A050268, A128878, A217439, A217440.

%K sign,easy

%O 0,1

%A _Yusuf Z Gurtas_, Feb 10 2013