哪位帮个忙,列两张表 ,第一张要求:1000以内的质数?第二张,1000以内质数的差,例3-2=1,5-3=2,7-5=2 11-7=4 .直接列表 1,2,2,4.很麻烦的

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/01 08:01:54

哪位帮个忙,列两张表 ,第一张要求:1000以内的质数?第二张,1000以内质数的差,例3-2=1,5-3=2,7-5=2 11-7=4 .直接列表 1,2,2,4.很麻烦的
哪位帮个忙,列两张表 ,第一张要求:1000以内的质数?第二张,1000以内质数的差,例
3-2=1,5-3=2,7-5=2 11-7=4 .
直接列表 1,2,2,4.很麻烦的

哪位帮个忙,列两张表 ,第一张要求:1000以内的质数?第二张,1000以内质数的差,例3-2=1,5-3=2,7-5=2 11-7=4 .直接列表 1,2,2,4.很麻烦的
质数表
[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,
79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163
,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251
,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349
,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443
,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557
,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647
,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757
,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863
,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983
,991,997]
==========
两两差的表(去重后的)
set([0,1,2,3,4,5,6,8,9,10,11,12,14,15,16,17,18,20,21,22,24,
26,27,28,29,30,32,34,35,36,38,39,40,41,42,44,45,46,48,50,51,
52,54,56,57,58,59,60,62,64,65,66,68,69,70,71,72,74,76,77,78,
80,81,82,84,86,87,88,90,92,94,95,96,98,99,100,101,102,104,105,
106,107,108,110,111,112,114,116,118,120,122,124,125,126,128,129,
130,132,134,135,136,137,138,140,142,144,146,147,148,149,150,152,
154,155,156,158,160,161,162,164,165,166,168,170,171,172,174,176,
177,178,179,180,182,184,186,188,189,190,191,192,194,195,196,197,
198,200,202,204,206,208,209,210,212,214,216,218,220,221,222,224,
225,226,227,228,230,231,232,234,236,237,238,239,240,242,244,246,
248,249,250,252,254,255,256,258,260,261,262,264,266,267,268,269,
270,272,274,275,276,278,279,280,281,282,284,286,288,290,291,292,
294,296,298,300,302,304,305,306,308,309,310,311,312,314,315,316,
318,320,322,324,326,328,329,330,332,334,335,336,338,340,342,344,
345,346,347,348,350,351,352,354,356,357,358,360,362,364,365,366,
368,370,371,372,374,376,377,378,380,381,382,384,386,387,388,390,
392,394,395,396,398,399,400,402,404,406,407,408,410,412,414,416,
417,418,419,420,422,424,426,428,429,430,431,432,434,436,437,438,
440,441,442,444,446,447,448,450,452,454,455,456,458,459,460,461,
462,464,465,466,468,470,472,474,476,477,478,480,482,484,485,486,
488,489,490,492,494,496,497,498,500,501,502,504,506,507,508,510,
512,514,516,518,519,520,521,522,524,526,528,530,532,534,536,538,
539,540,542,544,545,546,548,550,552,554,555,556,558,560,561,562,
564,566,567,568,569,570,572,574,575,576,578,580,582,584,585,586,
588,590,591,592,594,596,597,598,599,600,602,604,605,606,608,610,
611,612,614,615,616,617,618,620,622,624,626,628,629,630,632,634,
636,638,639,640,641,642,644,645,646,648,650,651,652,654,656,657,
658,659,660,662,664,666,668,670,671,672,674,675,676,678,680,681,
682,684,686,688,689,690,692,694,696,698,699,700,702,704,706,707,
708,710,712,714,716,717,718,720,722,724,725,726,728,730,731,732,
734,736,737,738,740,741,742,744,746,748,749,750,752,754,755,756,
758,759,760,762,764,766,767,768,770,771,772,774,776,778,780,782,
784,785,786,788,790,792,794,795,796,798,800,802,804,806,807,808,
809,810,812,814,816,818,819,820,821,822,824,825,826,827,828,830,
832,834,836,837,838,840,842,844,846,848,850,851,852,854,855,856,
857,858,860,861,862,864,866,868,870,872,874,875,876,878,879,880,
881,882,884,885,886,888,890,892,894,896,898,900,902,904,905,906,
908,909,910,912,914,916,917,918,920,922,924,926,927,928,930,932,
934,935,936,938,939,940,942,944,945,946,948,950,951,952,954,956,
958,960,962,964,965,966,968,969,970,972,974,975,976,978,980,981,
984,986,988,989,990,992,994,995])

质数表
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73,
79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163
, 167, 173, 179, 181, ...

全部展开

质数表
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73,
79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163
, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251
, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349
, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443
, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557
, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647
, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757
, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863
, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983
, 991, 997]

收起

2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107
109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223
227 229 233 239 241 251 257...

全部展开

2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107
109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223
227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337
347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457
461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593
599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719
727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857
859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997

收起