%I #7 Jun 02 2013 19:47:14
%S 1373,1319,1033,1493,853,839,593,1093,461,487,281,821,197,263,97,677,
%T 61,167,41,661,53,199,113,773,173,359,313,1013,421,647,641,1381,797,
%U 1063,1097,1877,1301,1607,2333,1847,1933,2203,2393,3253,2693,3079,3121,4133
%N a(x) = if one of {4x^2 - 146x + 1373, 4x^2 - 144x + 1459, 4x^2 - 142x + 1301, 4x^2 - 140x + 1877} is prime, then pick that prime in sequence.
%C The polynomials are tested in a cycle beginning with t[1 + mod [x,4]], i.e. when x==0 mod 4, they are tested in order t1,t2,t3,t4; when x==1 mod 4, they are tested in the order t2,t3,t4,t1, etc. If none of the polynomials are prime, no value is given. [From _Harry J. Smith_, Jan 28 2009, Jan 31 2009]
%C Based on correspondence with Aldrich Stevens.
%H Harry J. Smith, <a href="/A139414/a139414.txt">Comments on this sequence</a>
%e The initial terms are {1, 1373}, {2, 1319}, {3, 1033}, {4, 1493}, {5, 853}, {6, 839}, {7, 593}, {8, 1093}, {9, 461}, {10, 487}, ..., {73, 11597}, {74, 12263}, {75, 12697}, {76, 13877}, {77, 13381}, {78, 14087}, {79, 14561}, {80, 15541}, {81, 15791}, {82, 16553}
%t a = {4x^2 - 146x + 1373, 4x^2 - 144x + 1459, 4x^2 - 142x + 1301, 4x^2 - 140x + 1877}; (* functional "if" ladder to switch polynomials*) g[x_] := If[PrimeQ[a[[1 + Mod[x, 4]]]], a[[1 + Mod[x, 4]]], If[PrimeQ[a[[1 + Mod[x + 1, 4]]]], a[[1 + Mod[x + 1, 4]]], If[PrimeQ[a[[1 + Mod[x + 2, 4]]]], a[[1 + Mod[x + 2, 4]]], If[PrimeQ[a[[1 + Mod[x + 3, 4]]]], a[[1 + Mod[x + 3, 4]]], a[[1 + Mod[x, 4]]]]]]]; Flatten[Table[If[PrimeQ[g[x]], g[x], {}], {x, 0, 500}]] Length[%] Sort[Table[If[PrimeQ[g[x]], {x, g[x]}, {}], {x, 0, 500 }]];
%o (PARI) {n=0; for( x=0,12022, t=[4*x^2-146*x+1373, 4*x^2-144*x+1459, 4*x^2-142*x+1301, 4*x^2-140*x+1877]; for(i=0,3, if( isprime( p=t[ (x+i)%4+1 ]), print(n++," "p); write("b139414.txt", n," "p); break)))}
%Y Cf. A155814.
%K nonn
%O 1,1
%A _Roger L. Bagula_, Jun 09 2008
%E Clarified the definition of the sequence and added a PARI program. _Harry J. Smith_, with help from _M. F. Hasler_, Jan 31 2009
|