A096659 Earliest value of C in y = x^2+(2n-1)x+C such that y is prime for all x = 0 to n.
2, 3, 3, 5, 23, 31, 47, 59, 13, 29, 17, 37, 23, 47, 73, 251, 281, 313, 347, 383, 421
Offset: 0
Examples
Triangle of y, primes, starts: 2, 3, 7, 3, 9, 17, 5, 13, 23, 35, 23, 33, 45, 59, 75, 31, 43, 57, 73, 91, 111, 47, 61, 77, 95, 115, 137, 161, 59, 75, 93, 113, 135, 159, 185, 213, ...
Programs
-
PARI
a(n) = C = 1; ok = 0; while (! ok, ok = 1; for (x = 0, n, if (! isprime(x^2+(2*n-1)*x+C), ok = 0; break;);); if (ok, return (C)); C++;); \\ Michel Marcus, Aug 10 2013
-
PARI
works(C,n)=for(x=1,n,if(!isprime(x^2+(2*n-1)*x+C), return(0)));1 a(n)=forprime(C=2,,if(works(C,n),return(C))) \\ Charles R Greathouse IV, Aug 12 2013
Comments