Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 Sep 08 2022 08:46:13
%S 41,43,53,83,151,281,503,853,1373,2111,3121,4463,6203,8413,11171,
%T 14561,18673,23603,29453,36331,44351,53633,64303,76493,90341,105991,
%U 123593,143303,165283,189701,216731,246553,279353,315323,354661,397571,444263,494953
%N a(n) = (1/4)*n^4 - (1/2)*n^3 + (3/4)*n^2 - (1/2)*n + 41.
%C Empirical Observation: Reasonably productive (better than 85% in first 24 terms) prime-generating polynomial.
%C All integers generated by this polynomial for 0 < n <= 24 are prime with the exception of a(14) = 47*179, a(17) = 71*263, and a(20) = 47*773.
%C Negative and zero values of n also produce primes but they are not unique.
%C a(n) = (1/4)*n^4 - (1/2)*n^3 + (3/4)*n^2 - (1/2)*n + 809, for 0 < n <= 24, is also reasonably productive but produces composites at a(4), a(7), a(19) and a(20).
%C a(n) = (1/4)*n^4 - (1/2)*n^3 + (3/4)*n^2 - (1/2)*n + 641, for 0 < n <= 24, is also quite productive.
%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_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F G.f.: x*(41 - 162*x + 248*x^2 - 162*x^3 + 41*x^4)/(1-x)^5. - _Vincenzo Librandi_, Jul 03 2015
%F a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5), n>5. - _Wesley Ivan Hurt_, Jul 09 2015
%p A259552:=n->n^4/4-n^3/2+3*n^2/4-n/2+41: seq(A259552(n), n=1..100); # _Wesley Ivan Hurt_, Jul 09 2015
%t f[n_] := n^4/4 - n^3/2 + 3 n^2/4 - n/2 + 41; Array[f, 38] (* or *)
%t LinearRecurrence[{5, -10, 10, -5, 1}, {41, 43, 53, 83, 151}, 38] (* _Robert G. Wilson v_, Jul 07 2015 *)
%o (Magma) [(1/4)*n^4-(1/2)*n^3+(3/4)*n^2-(1/2)*n+41: n in [1..40]]; // _Vincenzo Librandi_, Jul 03 2015
%Y Cf. A202018.
%K nonn,easy
%O 1,1
%A _Robert Potter_, Jun 30 2015
%E Corrected and extended by _Vincenzo Librandi_, Jul 03 2015