OFFSET
0,1
COMMENTS
The polynomials are tested in a cycle beginning with a(1 + x mod 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. If none of the polynomials are prime, a zero value is given.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..10000
EXAMPLE
n a(n)
0 1373
1 1319
2 1033
3 1493
. . .
78 14561
79 0
80 15541
. . .
4686 87170273
4687 87198407
4688 0
4689 0
4690 0
4691 0
4692 0
4693 87413191
4694 0
4695 87516677
4696 87544133
PROG
(PARI) p1(n)=4*n*n-146*n+1373 p2(n)=4*n*n-144*n+1459 p3(n)=4*n*n-142*n+1301 p4(n)=4*n*n-140*n+1877 { for (n=0, 10000, t1=p1(n); t2=p2(n); t3=p3(n); t4=p4(n); if (n%4==0, b1=t1; b2=t2; b3=t3; b4=t4; ); if (n%4==1, b1=t2; b2=t3; b3=t4; b4=t1; ); if (n%4==2, b1=t3; b2=t4; b3=t1; b4=t2; ); if (n%4==3, b1=t4; b2=t1; b3=t2; b4=t3; ); a=0; if (isprime(b1), a=b1); if (a==0 && isprime(b2), a=b2); if (a==0 && isprime(b3), a=b3); if (a==0 && isprime(b4), a=b4); print(n, " ", a); write("b155925.txt", n, " ", a); ) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Harry J. Smith, Jan 31 2009
STATUS
approved