本周问题:生成质数
1772年,数学家莱昂哈德·欧拉注意到,如果将 代入多项式 ,其结果是一个素数。他还发现,当 时也得到素数,并且当 的取值从 0 到 39 时,结果一直为素数。
如果我们用 代替,并将 代入,会得到 3。将 代入会得到 5,但当 时,结果是 9,不是素数。因此, 仅生成了两个连续的素数。
那么,使用 等等, 能生成多少个连续的素数呢?
对于一个素数 ,我们可以用 生成一个素数序列,其中 等等。在 220 到 230 之间的 值中,哪个值能生成最长的素数序列?
我注意到,对于所有能生成多个素数的多项式的 值, 也为素数(我们称之为“孪生素数”对)。为什么会这样?是否总是如此呢?
(来源:New Scientist,BrainTwister #36)
原文:
In 1772, mathematician Leonhard Euler noticed that the value of the polynomial is a prime number if you set . He also spotted it is prime if and it keeps on giving primes for values of x up to 39.
If we use instead, and put , we get 3. Using gives 5, but the pattern then breaks because gives 9, which isn’t prime. So, generates a sequence of two primes.
How many primes in a sequence are created by using and so on?
For a prime , we can generate a sequence of primes using with and so on. Which value of between 220 and 230 generates the longest sequence of primes?
I noticed that for all the values of with a polynomial that generates multiple primes, is also prime (we call this a pair of twin primes). Why is this? Will it always be the case?
上期答案:切割魔方
想象一个3×3×3的立方体(像魔方一样),可以沿着组成大立方体的27个小立方体之间的线将其切割成独立的部分。
如果我们允许一次切割多个部分(就像一张二维平面穿过整个形状),那么最少需要几刀才能将立方体切割成四个任意大小的独立部分?
要将整个立方体切割成27个独立的小立方体,我们可以进行6刀(每个方向上切两刀)。可以确信,即使允许在切割之间移动部分,也不可能用少于6刀完成。
如果我们只能每次对一个部分进行切割——也就是说,每次取一个部分并进行一次完全穿过它的切割——最少需要几刀才能将整个立方体分割成27个独立的小立方体?
答案:
要切出四块,我们只需要两刀。第一刀可以从立方体的一侧切下一个3x3的部分,然后将这些切好的部分保持在一起,再沿着任何穿过两部分的平面切开即可。
如果每次切割都将立方体对半分,那么最多可以通过五刀将立方体切成 (2^5 = 32) 个更小的部分。然而,在这种情况下,第一刀会把27个小立方体分成9和18块,之后不可能在仅用四刀的情况下把这18块再次对半切开(即使每次对半切开,24的最大分割数也只有16)。
如果每次只能切一个块,那么需要26刀:每次切割都会将总块数增加1。
原文
To make four pieces, we just need two cuts. One would cut a 3-by-3 slice off one side of the cube, then we just keep the pieces together and cut along any plane that passes through both.
If each cut you make splits the cubes in half, it should be possible to create as many as 25 = 32 smaller pieces in five cuts. In this case, however, the first cut will always split the 27 cubes into pieces of size 9 and 18, and then there is no way to split the 18 cubes in only four cuts (even if we split them in half each time, 24 is only 16).
If we can only cut one piece at a time, this will take 26 cuts: each cut increases the total number of pieces by 1.