Thread: CRT offsets
View Single Post
Old 2021-04-02, 23:22   #8
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

2×32×83 Posts
Default

Quote:
Originally Posted by henryzz View Post
I have discovered that my code for optimizing two primes at once never ran in that example.

A new solution with a score of 6751 which is a 1.85% reduction:

Code:
CRT: 8469576951389608151420874612615248616679698628057854437509053972612955366555320894561872624382237635079885558563870534052217477436104252867174000041944156922912561766571997613006274021838826098197325662350934223350741723829453060156074421445837208255551556476810588934325648951128820567850687481042537296586478777428454819368501658137716248939703709052207615032122029068361490990563292657505826840688262675440573949681785688562184745930464202386467618022726533740660243190799332773437399842946158833982674676425510200684032568143951671293691370321799819336716700358907545429943530422898407791341511921681314446274773327602900320481956968946843797282682574932894684966040924977143304891767716524218522224936463951014999066477878268171275264707709149431832902561928496148592689848474046162851289479187235111656666213839360392289731861241239720808886029056558521388726512874800370512496880793187880924543820118420840145398615041449704391530784132285244099094179856336900303772721468723679779063627069841459985611913686007421021243652404760798171849403655737475138373549743888443864575288425141105161547963150705121654884290994510253244670208557545985000235032372142518137921512941385589556622276085201236169381606533374179244088628404687835948161844272649862634525800077115357854869915899243762608571034327460038871807559461325957221993127284885145386256067988154853447758014361607999698831259504448329042743089130220831200489088887537838750681387087767022701182626524696926458762623129955177683776233366828778342669184487734636570942685311644027753361053450100749345467048948865209261963820137122554115571221339740099583465185411253888270073588498091981787259244906051673644422452596024426500938487129453252645374507942343995126219107225573379784056315868057346232635860997414098016376029573942170734698751505396133782438672809906699219815739263597462525293228996396324160649240961334834847630260552990397264236203563967578703243898637175343089911074500785618183264451868946154512867798070635093405106622945892148665297395754589653740283735911128979800063785478611407363085180586031749390310708165010716505502352043889672055641034853846639815491476733852947674830142758738340739713317166255073384485662593989473604750482708526620508676929131092773723611139952568902506370068713560887716229793234977719976539390718331237488896298963758648587199452808298507103139928999916636620120946467017007745896989025950050891299944364458128718199522075512823093943125147828933774814684579625127285057613564486948473575018389753837523630779976784430768308097266761592607807793095521726619861464426048736379270150434607863399056390508683087224846655375799136157533277970790907876341451083224572991331610888258518518910406592214153325486473654621570104732800693060638149475785478579287985467321570059015938495293761530426109736573097235202893030745098214278835496858156318531446429216802142654019627757560352495360637123367043006265244002462352550828844394477047298735623303654397493154092689404708886131824996652784745146417777652008770799504658114793560731473454734217047847792687746815566476473161282366702298904860480598385581466291458096839125454749809204220298893707965248295603648219182839069213492098305733841698267716224826531076751266302888478535140828022311245755299925807313340739971476323322672142330110864171788382566255008478431410933741077804609620498830400767753967830750382506079963878400826435518792682438473813491299
Score: 6751 for 1 2 4 3 9 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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601 0 0 6003 0 0 0 450 2594 0 0 0 0 910 3955 5094 0 0 0 0 2185 0 6479 0 0 0 4089 0 5661 0 0 0 0 0 4493 1832 0 0 1567 0 0 4977 0 4057 0 3682 2514 0 0 0 0 6370 0 0 0 0 0 2268 0 1851 216 0 6194 5711 0 316 6248 1476 3693 892 0 6250 0 0 0 0 0 3850 7204 0 5047 0 0 1512 3954 596 95 0 4028 5252 0 3548 0 7488 1459 0 0 0 0 0 0 392 2338 0 0 1744 6526 0 0 0 2903 0 599 2963 5057 359 0 6714 0 0 0 0 0 0 0 0 2330 0 0 5040 2711 4294 0 0 5880 29 5315 0 0 0 6623 4980 6269 6750 4105 2147 4337 4503 0 5760 6086
Improved solution with 6727 numbers survived the sieve:
Code:
c=894101235464362219721356880526656966576862269828154398514501227439505880868173768034261872450219940738532433503702992181332283540241729189200170368496080770122489627384936785180822077759420834840561182525045255938041478030429899220789025231018470726274025492966577222895730338530292884911304277977699222206813826083925528607407799301583580289812608633646270306158259174036079292088947790819460085862530772370455045076770278964550649084460021280341711965062751491000554253170673646713078344136774647836997201604339266315692210513549633580358609336259645730281936246594603456661570776888550674163634855633831796384828091280700810908752015094038200535425967302545438000348218598245332367415689514556533807924323611251898728570083748171206589525074279586797457698429254606804258189533651817045728718393452270759924592675278463371210308241363761870425698856921072227432679151112064523990764452715478267958012714547443885201030528280178023966939575884538466086574843776408189417837812055471550930523625276363727449113222586477779002040574021717468505417530151198648354820236809644181741987407621291156982412248712010181628887088591618292913355828004228067420111435043157992659197693679697297306193268946853228042239659270956989976808964040163253787225672984728295075589585376728012746179310829710199392901875388666410598686890175601525712229638029608005550169463504405962647786956288427048281930470726811599112235540649761269587349639189410143432348745718604409679652174797058300364683985530000911456959333788684229582059305261022598796234510678710978630229142737943627091943012769300825635516414744818796511477636303583986805007029374735816223473972159595733842011861521954425026119396159574670408544104665751951696384669678102450544493505977567652253124724792572488023495857586056491430481170106603895295280433201526704050258004779142094368127356640032572152055880400956480991671714157419673844216327291996287985774765949788048994117868350791991047293406031640441655409535734211716075143902785171452558689018612296071330944599380563622304728360830364074129032435888551988219490433326856557423715492247871137512878245840634216466637848940266182444735750086742889766031619666311820633684286973774359628034404401583508236488898646822505365046407238113673259344652677158165745036109887829163563567646520223972380464316042166790790693114352428388364722769592005875489209496529405691053910434076264528443715278874328439894657327238467248337101747689678283984347139861551539594013177790624611325080205297391833388427498485470668802506635522617306598874661249298098297526692019854328905349621621861481661734112299946598507185699362243478831896469919744277949661645477466251371546539398053977019979598064776590532404410742950596859290942940124276493228074685653408594265857311993997836469900025326597722719858380729151183108607568446547277547008273121775991099397711796734842892790807406332936630945708209528554119434233296421185811055765457485357326882091683943278438330731574590639585492816854036436053779656789420982313131475910956271639570875455598599104813291692484667526552908981818701580919007911469447297251959275472417184201256584879618163132293893374351565916952074567060529507006270580469479405330364937727713703898012119701295575478573459984224904343045725473505704190646951312484991894044407080091394692206526715577671509672870081507785250017047593209776248063781170242589849299138314228397347311816225505996337124551829;
t=1;forprime(p=2,7993,t*=p)   
sum(i=-110000,110000,gcd(c+i,t)==1)
%45 = 6727
R. Gerbicz is offline   Reply With Quote