1
0
Fork 0

Problem 28

This commit is contained in:
Jonathan Chan 2016-12-01 00:57:25 -08:00
parent 446f043d68
commit 69eb5748a9
2 changed files with 10 additions and 13 deletions

13
27.txt
View File

@ -1,13 +0,0 @@
Euler discovered the remarkable quadratic formula:
n^2+n+41
It turns out that the formula will produce 40 primes for the consecutive integer values 0≤n≤39. However, when n=40,40^2+40+41=40(40+1)+41 is divisible by 41, and certainly when n=41,41^2+41+4 is clearly divisible by 41.
The incredible formula n^279n+1601 was discovered, which produces 80 primes for the consecutive values 0≤n≤79. The product of the coefficients, 79 and 1601, is 126479.
Considering quadratics of the form:
n^2+an+b, where |a|<1000 and |b|≤1000
Find the product of the coefficients, a and b, for the quadratic expression that produces the maximum number of primes for consecutive values of n, starting with n=0.

10
28.txt Normal file
View File

@ -0,0 +1,10 @@
Upper-right: (2n-1)²
Upper-left : (2n-1)² - (2n-2)
Lower-left : (2n-1)² - 2(2n-2)
Lower-right: (2n-1)² - 3(2n-2)
Total (nth spiral): 4(2n-1)² - 6(2n-2)
Spirals: ceiling(1001/2) = 501
Sum_{n=2}^{n=501} 16n²-28n+16 = 669 171 000
Answer = 669171001