2 [; x W+ x6 l( x+ V3 H6 u4 g. [他有个好朋友,据说是最好的朋友,是生于匈牙利的波兰犹太人数学家乌拉姆,这位先生曾参与曼克顿计划(核武器上有Teller-Ulam design,Teller指爱德华·泰勒)。他亦有参与研究核能推动的航天飞机。在纯数学上,遍历理论、数论、集合论和代数拓扑都有他的足迹。 1 x1 Z! P( c5 e' y: F7 P9 L' j 1 S D. c2 K! V1 j所以我在这里要说的幸运数不是中餐馆的饼干里给你的数字,也不是买彩票开奖的数字,而是在1955年波兰数学家乌拉姆提出的一个自然数列,用类似埃拉托斯特尼筛法的算法后留下的整数集合。 ! M4 Q8 W) t3 M1 _ 2 w4 a: S3 n0 a8 K- I- SIn number theory, a lucky number is a natural number in a set which is generated by a "sieve" similar to the Sieve of Eratosthenes that generates the primes.9 z8 Z9 O) _/ h3 x8 g, X! ?
/ k O$ u: w4 e6 T幸运数的定义 - _5 A1 ], R- [ }% [! HFORMULA * {. N& n/ [& d0 E7 DStart with the natural numbers. Delete every 2nd number, leaving 1 3 5 7 ...; the 2nd number remaining is 3, so delete every 3rd number, leaving 1 3 7 9 13 15 ...; now delete every 7th number, leaving 1 3 7 9 13 ...; now delete every 9th number; etc.( h" ]/ O a- D/ W- [
! ]% j8 [1 ?+ A) M) f/ @
具体一点来说说幸运数列怎么筛选出来的(喜欢数论的同学一定知道挑选素数的埃拉托斯特尼筛法,这个办法是类似的)$ `1 V: O5 D2 L4 _( M
0 @! d# ]9 i8 A) r: s# W初始,从1开始的自然数列: $ t2 a6 E, _% N2 N( \Begin with a list of integers starting with 1: # v+ s( S+ B+ x; T1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ……! ?, H6 P H# n! o2 _
( l) ~ Z2 C# k/ f7 l* |) P/ ]开始删除,在这个数列里,从2开始,首先是每隔2个数字,删除第二个数字。剩下来的数字是奇数~~ 2 T [" R) p1 ~1 \6 l剩下的数列如下: ( i% r/ ]% T3 T. q0 r" }, A1 WEvery second number (all even numbers) is eliminated, leaving only the odd integers: u. J2 f! \; U9 y9 V7 x1 3 5 7 9 11 13 15 17 19 21 23 25 ……( I" K0 [$ T# J, K' t+ w+ W
L$ e# w1 I" K2 i5 q接下来是3,每隔3个数字删除第三个。剩下的数列如下: + A. A2 N* x" i: a7 pThe second term in this sequence is 3. Every third number which remains in the list is eliminated: 7 {* Q8 D7 V1 Y2 l1 3 7 9 13 15 19 21 25 ……* x5 B) G/ L5 ~9 v% l
5 ]' S" ^: p: q/ G) S现在接下来的数字是7,所以把上述数列中每第七个删除,剩下的数列是: 9 c, r! e4 q' VThe next surviving number is now 7, so every seventh number that remains is eliminated:2 g) M+ f a/ V/ e5 T; ~
1 3 7 9 13 15 21 25 ……# w! o7 t+ C5 h7 [
* e7 r, g" x3 f" K2 w* P6 t% _
接下来是9,……" ~% k# w5 K8 E1 }1 _
这个过程可以一直无限继续下去,被幸运地留下来的数字就是幸运数。# ^5 x+ @# J9 g) H# v z* Q