Skip to main content
Code Review

Return to Question

two corrections in the description
Source Link
user52292
user52292

Euler discovered the remarkable quadratic formula:

\$n^2 + n + 41\$

It turns out that the formula will produce \40ドル\$ primes for the consecutive values \$n = 0\$ to \39ドル\$. However, when \$n = 40, 402 + 40 + 41 = > 40(40 + 1) + 41\$\$n = 40, 40^2 + 40 + 41 = > 40(40 + 1) + 41\$ is divisible by \41ドル\$, and certainly when \$n = 41, 41^2 + > 41 + 41\$\$n = 41, 41^2 + 41 + 41\$ is clearly divisible by \41ドル\$.

The incredible formula \$n^2 − 79n + 1601\$ was discovered, which produces \80ドル\$ primes for the consecutive values \$n = 0\$ to \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\$

where \$|n|\$ is the modulus/absolute value of \$n\$ e.g. \$|11| = 11\$ and \$|−4| = 4\$ 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\$.

Euler discovered the remarkable quadratic formula:

\$n^2 + n + 41\$

It turns out that the formula will produce \40ドル\$ primes for the consecutive values \$n = 0\$ to \39ドル\$. However, when \$n = 40, 402 + 40 + 41 = > 40(40 + 1) + 41\$ is divisible by \41ドル\$, and certainly when \$n = 41, 41^2 + > 41 + 41\$ is clearly divisible by \41ドル\$.

The incredible formula \$n^2 − 79n + 1601\$ was discovered, which produces \80ドル\$ primes for the consecutive values \$n = 0\$ to \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\$

where \$|n|\$ is the modulus/absolute value of \$n\$ e.g. \$|11| = 11\$ and \$|−4| = 4\$ 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\$.

Euler discovered the remarkable quadratic formula:

\$n^2 + n + 41\$

It turns out that the formula will produce \40ドル\$ primes for the consecutive values \$n = 0\$ to \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 + 41\$ is clearly divisible by \41ドル\$.

The incredible formula \$n^2 − 79n + 1601\$ was discovered, which produces \80ドル\$ primes for the consecutive values \$n = 0\$ to \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\$

where \$|n|\$ is the modulus/absolute value of \$n\$ e.g. \$|11| = 11\$ and \$|−4| = 4\$ 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\$.

Added MathJax
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

How can iI improve this, maybe? Can you can offer a more efficient implementation?

How can i improve this, maybe you can offer a more efficient implementation?

How can I improve this? Can you offer a more efficient implementation?

Euler discovered the remarkable quadratic formula:

n2 + n + 41\$n^2 + n + 41\$

It turns out that the formula will produce 40\40ドル\$ primes for the consecutive values n = 0\$n = 0\$ to 39\39ドル\$. However, when n = 40, 402 +たす 40 +たす 41 = 40(40 + 1) + 41\$n = 40, 402 + 40 + 41 = > 40(40 + 1) + 41\$ is divisible by 41\41ドル\$, and certainly when n = 41, 412 + 41 + 41\$n = 41, 41^2 + > 41 + 41\$ is clearly divisible by 41\41ドル\$.

The incredible formula n2 − 79n + 1601\$n^2 − 79n + 1601\$ was discovered, which produces 80\80ドル\$ primes for the consecutive values n = 0\$n = 0\$ to 79\79ドル\$. The product of the coefficients, −79\$−79\$ and 1601\1601ドル\$, is −126479\$−126479\$.

Considering quadratics of the form:

n2 + an + b\$n^2 + an + b\$, where |a| < 1000\$|a| < 1000\$ and |b| < 1000\$|b| < 1000\$

where |n|\$|n|\$ is the modulus/absolute value of n\$n\$ e.g. |11| = 11\$|11| = 11\$ and |−4| =\$|−4| = 4\$ 4 FindFind the product of the coefficients, a\$a\$ and b\$b\$, for the quadratic expression that produces the maximum number of primes for consecutive values of n\$n\$, starting with n = 0\$n = 0\$.

Euler discovered the remarkable quadratic formula:

n2 + n + 41

It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 402 +たす 40 +たす 41 = 40(40 + 1) + 41 is divisible by 41, and certainly when n = 41, 412 + 41 + 41 is clearly divisible by 41.

The incredible formula n2 − 79n + 1601 was discovered, which produces 80 primes for the consecutive values n = 0 to 79. The product of the coefficients, −79 and 1601, is −126479.

Considering quadratics of the form:

n2 + an + b, where |a| < 1000 and |b| < 1000

where |n| is the modulus/absolute value of n e.g. |11| = 11 and |−4| = 4 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.

Euler discovered the remarkable quadratic formula:

\$n^2 + n + 41\$

It turns out that the formula will produce \40ドル\$ primes for the consecutive values \$n = 0\$ to \39ドル\$. However, when \$n = 40, 402 + 40 + 41 = > 40(40 + 1) + 41\$ is divisible by \41ドル\$, and certainly when \$n = 41, 41^2 + > 41 + 41\$ is clearly divisible by \41ドル\$.

The incredible formula \$n^2 − 79n + 1601\$ was discovered, which produces \80ドル\$ primes for the consecutive values \$n = 0\$ to \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\$

where \$|n|\$ is the modulus/absolute value of \$n\$ e.g. \$|11| = 11\$ and \$|−4| = 4\$ 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\$.

added 875 characters in body
Source Link
Rezo Megrelidze
  • 1.1k
  • 1
  • 11
  • 25
Loading
edited tags
Link
200_success
  • 145.5k
  • 22
  • 190
  • 478
Loading
Source Link
Rezo Megrelidze
  • 1.1k
  • 1
  • 11
  • 25
Loading
lang-cs

AltStyle によって変換されたページ (->オリジナル) /