哪位帮个忙,列两张表 ,第一张要求:1000以内的质数?第二张,1000以内质数的差,例

问题描述:

哪位帮个忙,列两张表 ,第一张要求: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])再请给一张1000以内的质数,后一位减去前一位的差的列表。3-2=15-3=27-5=211-7=413-11=217-13=419-17=223-19=429-23=631-29=237-31=641-37=443-41=247-43=453-47=659-53=661-59=267-61=671-67=473-71=279-73=683-79=489-83=697-89=8101-97=4103-101=2107-103=4109-107=2113-109=4127-113=14131-127=4137-131=6139-137=2149-139=10151-149=2157-151=6163-157=6167-163=4173-167=6179-173=6181-179=2191-181=10193-191=2197-193=4199-197=2211-199=12223-211=12227-223=4229-227=2233-229=4239-233=6241-239=2251-241=10257-251=6263-257=6269-263=6271-269=2277-271=6281-277=4283-281=2293-283=10307-293=14311-307=4313-311=2317-313=4331-317=14337-331=6347-337=10349-347=2353-349=4359-353=6367-359=8373-367=6379-373=6383-379=4389-383=6397-389=8401-397=4409-401=8419-409=10421-419=2431-421=10433-431=2439-433=6443-439=4449-443=6457-449=8461-457=4463-461=2467-463=4479-467=12487-479=8491-487=4499-491=8503-499=4509-503=6521-509=12523-521=2541-523=18547-541=6557-547=10563-557=6569-563=6571-569=2577-571=6587-577=10593-587=6599-593=6601-599=2607-601=6613-607=6617-613=4619-617=2631-619=12641-631=10643-641=2647-643=4653-647=6659-653=6661-659=2673-661=12677-673=4683-677=6691-683=8701-691=10709-701=8719-709=10727-719=8733-727=6739-733=6743-739=4751-743=8757-751=6761-757=4769-761=8773-769=4787-773=14797-787=10809-797=12811-809=2821-811=10823-821=2827-823=4829-827=2839-829=10853-839=14857-853=4859-857=2863-859=4877-863=14881-877=4883-881=2887-883=4907-887=20911-907=4919-911=8929-919=10937-929=8941-937=4947-941=6953-947=6967-953=14971-967=4977-971=6983-977=6991-983=8997-991=6又帮你写了个程序,能不能追加点分呀:-)追加100分,1,把前面的质数减质数去掉,只保留差,列一张表。 2,每一个差得个数。(2的个数,4的个数,6的个数。。。。。)列一张表。辛苦了。