Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168744
Image: ubuntu2004
set_random_seed(1320) lower = 2^1023 upper = 2^1024
flag=0 c=0 while flag==0: x=0 c=c+1 for i in range(8): n=current_randstate().ZZ_seed() x=x+2^((i)*128)*n if i==7: break if is_prime(x) and x > lower and x < upper: print "after", c, "steps prime found is", x flag=1
after 496 steps prime found is 112150950438247593149296082124123583154718371407666489486817857481779162197042859694229764458718327461732535637287484728017287029094532781881906062274808002766982602418175489746581788522179094492535289643984701495912435287165997022667340603020058360588380977567127306326435107481176478822563962639246283528229