|
#13 Double Factored
Let's call a number "double factored" if at least one of its prime factors repeats itself when factorised. What is the smallest positive integer that itself and its four neighbors (2 before, 1 before, the number itself, 1 after, 2 after) are double factored?
If the problem was asked for the number and its two neighbors (1 before, the number itself, 1 after) then the answer would be 49. (48=2x2x2x2x3 , 49=7x7, 50=2x5x5).
如果一个数,它的某个质数因子在分解的时候重复出现,则称之为“重因子”数。最小的连同四个相邻数都是“重因子”数的整数是多少?(四个相邻数只的是:前两个数,该数本身,后两个数)
如果问题问的是两个相邻数(前一个,该数本身,后一个)那么答案为 49 (48=2x2x2x2x3 , 49=7x7, 50=2x5x5)
这个用筛法程序改一下即可,不知道多少范围内能找出来。
|
|