OFFSET
1,1
COMMENTS
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]
Based on correspondence with Aldrich Stevens.
LINKS
Harry J. Smith, Comments on this sequence
EXAMPLE
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}
MATHEMATICA
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 }]];
PROG
(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)))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Jun 09 2008
EXTENSIONS
Clarified the definition of the sequence and added a PARI program. Harry J. Smith, with help from M. F. Hasler, Jan 31 2009
STATUS
approved