Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168695
Image: ubuntu2004
Create a "power series ring" over the indeterminate x (which has the side effect of binding the Python variable x to an object representing the symbolic variable x). The argument default_prec specifies a default value for how many terms in the power series are kept before Sage just writes O(x^n) to represent all terms in the power series for some power (n) of x onwards.
R.<x> = PowerSeriesRing(QQ, default_prec=500)
fay and fan are the ordinary generating functions (ogfs) for the numbers of successful and unsuccessful excecutions of an action, parameterised by the number of action failures that occur in the execution, i.e. fay = Sum_n ny(a,n).x^n. We want the coefficient of x^0 for fay (written as [1]fay) to be 1, and [x^n]fay = 0 for n>0. Similarly we have [1]fan = 0, [x]fan = 1, and [x^n]fan = 0 for n>1. fa is the Python dictionary structure associating 'y' with fay and 'n' with fan.
fay = 1 fan = x fa = {'y':fay,'n':fan}
Suppose b_1 and b_2 are plan bodies, fdict = {'y': fb_1^y,'n': fb_2^n} where fb_1^y is the ogf for the sequence [removed], fb_1^n is the ogf for the sequence [removed], and gdict is defined similarly. Then seq(fdict,gdict) is the dictionary {'y': fb_1b_2^y, 'n': fb_1b_2^n} where fb_1b_2^y is the ogf for the sequence [removed] and fb_1b_2^n is the sequence [removed] seql performs a similar 'sequential composition' of 'y' and 'n' ogf dictionaries, but takes a list of dictionaries as an argument (i.e. it is for the sequential composition of a list of plan bodies. repeat does the same thing for a single plan body repeated in a sequence a given number of times.
def seq(fdict,gdict) : return {'y':fdict['y']*gdict['y'], 'n':fdict['n'] + fdict['y']*gdict['n']} def seql(fdicts) : if fdicts == []: raise ValueError("seql called on empty list") elif fdicts[1:] == []: return fdicts[0] else: return seq(fdicts[0],seql(fdicts[1:])) def repeat(n,fdict): return seql([fdict for i in range(n)])
fp(depth) and fg(depth) compute the 'y' and 'n' ogfs for a plan and goal (respectively) at depth d. The definition of fp(depth) is derived solely from the structure of our assumed uniform plan body and the definitions of seq and repeat above. The definition of fg(depth) is based on a combinatorial analysis (not given here) that allows the 'y' and 'n' ogfs to be expressed as products of the 'y' and 'n' ogfs for fp(depth-1).
def fp(depth): if depth < 0: raise ValueError("fp called with depth < 0") elif depth == 0: return repeat(l,fa) else: return seq(repeat(l,fa), repeat(k,seq(fg(depth),repeat(l,fa)))) def fg(depth): if depth < 1: raise ValueError("fg called with depth < 1") else: fpdict = fp(depth-1) return {'y':j*sum([binomial(j-1,i)*factorial(i)*(fpdict['n']**i)*fpdict['y'] for i in range(j)]), 'n':factorial(j)*fpdict['n']**j}
Test cases - set the parameters d,j,k and l to the desired values. For larger values the power series ring's 'default_prec' parameter may need to be adjusted. The coefficients in the ogfs for fg(d) show how many successful and failed executions there are with a given number of action failures. The ogfs for the partial sums (calculated using a result from generatingfunctionology) show how many successful and failed executions there are with *up to* a given number of action failures. These should converge to the values we got in our previous analysis that didn't consider how many action failures there were in an execution.
d=3 j=3 k=3 l=1 fgd = fg(d) print "fg(",d,") is:\n" print fgd ogfs_for_partial_sums = {'y':fgd['y']/(1-x),'n':fgd['n']/(1-x)} print "\nThe partial sum ogfs are:\n" print ogfs_for_partial_sums
WARNING: Output truncated!
fg( 3 ) is: {'y': 1594323 + 1716170729598*x + 924106220336662182*x^2 + 712829313927273793500*x^3 + 287270651019619475739504*x^4 + 78875898984894186376204176*x^5 + 16387258275035650006458334200*x^6 + 2722215002920007686087452162768*x^7 + 373858156176303991709187280951632*x^8 + 43391732471500317849798155828203680*x^9 + 4321631310000829139294600417255038752*x^10 + 373414933929706798678618755603646926720*x^11 + 28219509456417827009894685881642649471360*x^12 + 1876535990726902828691780524609903767364224*x^13 + 110313058460653442496665582732277550202068224*x^14 + 5753465015378699530676598368679464490344233728*x^15 + 267012095647877268020564623991756509835422411776*x^16 + 11053763862850519954357190355795498311170172906496*x^17 + 409129623281599106624584630908978266950193924917248*x^18 + 13570094608899561336138645899054610737023086913314816*x^19 + 404351756438567560289301891594696325059928572849945600*x^20 + 10854604309813302256285538846330873903323521431701936128*x^21 + 263353587025038848945518566884406736438895885650641844224*x^22 + 5795511852635865097908426071571622294991015608277164621824*x^23 + 116134326344754192925587421786238979019497468164667427799040*x^24 + 2127740036561935906248947190589181672792872704713926290505728*x^25 + 35790768882262104543877848290490874007849188419147614161600512*x^26 + 555021689112968542046924090655654366566683412002567319183867904*x^27 + 7966694195920351563695823905817844790852550604721667602110169088*x^28 + 106253755201089245601156951851814802252099358015947409049598918656*x^29 + 1321562019639280686030217826807304049819686766962141286979346628608*x^30 + 15381183653011896259236632453268880688559210433681597774043191640064*x^31 + 168047895090675797610487911837019737775032193190006764350503157891072*x^32 + 1728627627883026434804877010330342063190891183353929229959591469645824*x^33 + 16787438825940701040136700213562799379690069411934234461902350770896896*x^34 + 154305886334528144235456810752658004753878347093142875745622831354085376*x^35 + 1345590333525531994490566841343835240425048167636111960499726830911094784*x^36 + 11156187504925864967172197321225135287258501121766087295300314382910619648*x^37 + 88117209073706317684829932307651807245140553174618711684003835965937811456*x^38 + 664281345639830014751422211827248056458786909497788821078496264178971443200*x^39 + 4787785977636034939490242552836101355630766053158512239202014848578615246848*x^40 + 33044514020777687590932437921774459172972992355792751261174718422183544094720*x^41 + 218719234738806711567449036996965940338441485826041366635673896079679788417024*x^42 + 1390251045820954893453833329741487058934901116407979449235273790702891374215168*x^43 + 8497132455027953184651451850179175824506960280900263789447292799713737732784128*x^44 + 49996641917037013690825698567144611153405329701454917708341026341853498473185280*x^45 + 283517767852627812077868124535030680258850901029010520333862708165517809490591744*x^46 + 1551103040588867063156229527758117283560907330745349774036170369283312070531481600*x^47 + 8194881730783622344850372265865003862650930614479332330339810662121771938034483200*x^48 + 41848542542237038298259479153048337778324175580389349423480384896585714076236120064*x^49 + 206739202690657794538735433785527094591123902224743605654068478976760656283597537280*x^50 + 988818703749077782412735633764521755268197840777948887903524422640231515026895142912*x^51 + 4582339967481356481141769704432690306754387463851972983817255585568433829210943913984*x^52 + 20589260952440598680812793692260837176000474948276680868629003986550353816789536735232*x^53 + 89756318509140168149866133952868310536975781968329168399945686110900970308070849642496*x^54 + 379866866498104110398024944744288711200574520479520261772398896049111341883037535174656*x^55 + 1561692985745177070109667476368088133008575781667557303640875888149123498171578670120960*x^56 + 6240207855860533190247889072087255158069979647004106314223906872926867016156827730575360*x^57 + 24247636144771281935692581734815715085211787304205778110928393917882084309142325273034752*x^58 + 91668879341566696264867191099550132256488983423930728418750889610572378933289408173965312*x^59 + 337333937494370243768198314651131128371846880395988042211034557555237228836644294043369472*x^60 + 1208860389461833259805517826631737074423489576453466632629976820827286885205884065038729216*x^61 + 4220387304172455524266196582228631877442058684381685559680600030161765234541572040553398272*x^62 + 14360211746238962328033550447000201122673819258894432375844375944666941659417911371761713152*x^63 + 47639251766055236237945542312119640354008293956372180353769219499236571352465967740270673920*x^64 + 154141338749892934585536031243333798434529678352083242004986416211465258265777391334145916928*x^65 + 486597470143893231517271416761082840864363551696538004713684330259595494924062081105746984960*x^66 + 1499187044479994319592528488364451653076375391116924773370278487760692842313293068529714593792*x^67 + 4509293452217285725488482913170854370445753393523469826116137393973634997070333088987919417344*x^68 + 13245014392757013797282224223176259538259124020369526070370806646904013800682981198947212591104*x^69 + 38001928183234627809403137118921096525667965598982368417859892124887248301584220978062689304576*x^70 + 106531949789258993421159614409471390414427101839950272440296503174573604712514026677511160594432*x^71 + 291864329702381699181233232116023831876566001221214312503194289801833778183878900136769052737536*x^72 + 781644503844033792157232038051059039274657227467912118413101275137451168860420745785134395949056*x^73 + 2046724876146872891574612443874697166059682698434082857840068487519572824886152923006071727980544*x^74 + 5241085622654647993009958640372345220569509150416847534834619902299009909192329864789299923255296*x^75 + 13127419663482268848773262443737454235633023792412965930864174639068969330439662288647579292925952*x^76 + 32167240844883845735869265973163416925120952716367985225085252032132288655657254229297801180741632*x^77 + 77125862835812176433251771936248711247875254729784375309575299062648104853682435474210576580739072*x^78 + 180971060483919499770040325082867044419067908923521308621809082286476987419081712450650916811440128*x^79 + 415631043435170969312511765883793259915398752837747358315769731743954643827141475310112729737461760*x^80 + 934457158708193787095935231977816384530870267130015741093058710419886041157862871644183562400301056*x^81 + 2056943136109042757009324062996431065037660835076871839764092522253595044276881250601005138285953024*x^82 + 4433551486830162758635974503296523900177233272077100710187804865589128356902717964742192490367418368*x^83 + 9358349027062353653141775294256557057670628959707103305678156931583251861585604890130818874958938112*x^84 + 19346953897231785714017147472793678026032788091960192634347879751998988272957680524874845297271898112*x^85 + 39177455606282748544557270725821165089456126040889816166763570281719635752867246948081852248450138112*x^86 + 77716126950356313618787944677286896513893998062384723556473392935616594523018446169219544438181724160*x^87 + 151034126502131065418667862165398420754981773022254583406048999565957541816561276467226901632146997248*x^88 + 287582565111055438570019113165674189607981032020114498210683830274237720416734463533464316700480503808*x^89 + 536543457766833414314693340523264838688547213967630165148362334013765027925297449412026203193145819136*x^90 + 980912827670089404747121090300186853386857424367031888130219095209356211639816323126344263587615211520*x^91 + 1757374527628009023934966585467719289844798901936498616504169641303009491676743305974062504097456586752*x^92 + 3085523839749405525333527379152850660041777236582965505493913489653659934032121705824022766700474662912*x^93 + 5309375933564067992263429642895677265684022937810341284939099970821700971567965588949024717823037931520*x^94 + 8954152070795995046829848430085709005509699035884115285288073491294764913449769497926747168975680962560*x^95 + 14800808277850658238056024169737357587624448017723346898252231846280388495865641696051874727309986496512*x^96 + 23979332987989231960869685161956303125814521011473442141710516129170126608357981390287444149065058615296*x^97 + 38079160400637326363890498446812684238326855874662775040006314421061818932347086884940483517492754382848*x^98 + 59270873762319484886635814617090096877021192171610922776953960165019426624101011056061062335003407417344*x^99 + 90427662281095664388326629025282043392548293937133737426664652486464673410525472898060084222937360498688*x^100 + 135228057730492162611287917376966084051904651759925744504062543694501233073924223068029616409359952117760*x^101 + 198214120329639693138351522181836745463231591916560761228562606624738576750861475829347340268134081757184*x^102 + 284772857097439112409429272878585581880265509420459179522628363295684392439569359441524417543426229141504*x^103 + 401005171582489926536822096971393959323994086671013139528187894405430758022066843418230678948634697924608*x^104 + 553448321197417436171864721423377448775277167318574249363765121536314724788274868287946581823550056824832*x^105 + 748626859800436746329435466032707028558166439912190154059715015593985496360023265749132250833936275472384*x^106 + 992424822392073889173809636965626381091644821471900466554293968654809244787417683951188218309776834035712*x^107 + 1289298506446928531907258841475237134631064953359313671415449856017471734325691623630979382622713746030592*x^108 + 1641382620810919329875478433060053053859543597279935257642885461810709947473432153909809518039033270239232*x^109 + 2047578440312224742279604668819739437113050381613276928234673671715376484340921621655900734665699578871808*x^110 + 2502744378246556865860836414805093428562225529772322132205949659297343886062033323705445601665786763542528*x^111 + 2997129206670071840011545317828121039549195094180714485091268685164240003125434250735860291731838386307072*x^112 + 3516188345366511216941567742133004667561854141733355101065332819570252945093705742364672914964997333843968*x^113 + 4040898673675693353056108102867882714962588737263300897253151300119019379078274998436218885368083866714112*x^114 + 4548635762571356255970741106752216009646092358661212025640348603634950589647706033931570151538409204613120*x^115 + 5014603356062863135378922621013755724849201977132001772641357638196195234917727534884588233761699013853184*x^116 + 5413718263094792628501470962424113947731641532460905744536361459711638301813050686472636526592538498301952*x^117 + 5722769176859290896894095185657603257860189673817058062125595061829388666619953176825868463514429243260928*x^118 + 5922602084754908424482202849017881698294435755561917025111832450966594765994869354378200044446193507368960*x^119 + 6000053196420579953385036681616446310924540147169486153836299664487926553793401033873404875103590502367232*x^120 + 5949362798936911449285376619973943794144569874333248058070932208267229654353366499169422668623566447050752*x^121 + 5772862031330510872189594509797623650067047137187094726329873909729602454714155520346972774042646272278528*x^122 + 5480821650027458813832524444189356849713425407804342197797857982838189000169472477264868755248257322450944*x^123 + 5090471309331842839488631160122356597788352627752772399961860294727565651330871559405454735224783364947968*x^124 + 4624318213052994901183519493577866160386682075651137347079468909318494066277007993838223019770831142125568*x^125 + 4107992976470485853954897575688317027153145377734781184547245015992659983549658845110899745000747331223552*x^126 + 3567910171836299515369420747774268666645186499706725426886820440788924517596129475505732761511924657553408*x^127 + 3029041543195468604251195844316529095165162956550934661028645562471997673671394036125436062091799984865280*x^128 + 2513061709494748755922372241133686359629950451823256578286083732275506052216368579068740826558219935547392*x^129 + 2037049473339041619902628000099565035207455222072416550144157533260950119149324663904270935311576918392832*x^130 + 1612829668645047067532075232647846041473728105169912640861324311761854897455146150882758629385860280221696*x^131 + 1246940531014520548198142944691504299383146031819372494921007186755334253124168325325819189908392267218944*x^132 + 941127733128981320586821910676230715448071805034370859523790921381702894078848411461672628347982569275392*x^133 + 693210910972818508674203530782217245012958864630967675566282094482533097347890707491321511116330321838080*x^134 + 498146769836078710732132280245170785865975607488563503241330661603611560395920287163172495514726834372608*x^135 + 349122452039487523454180623683624327673522362733534905286760159542151834869868089163819248270773023932416*x^136 + 238545939888580947646378821777084778168173185694465725567105236302148590824144359444741858454720363888640*x^137 + 158846136207526444914688063189467943585000750322451982957914992939459149112248083280702256694619747123200*x^138 + 103043124790124281072408094712323857216285604160492359467499444850960264138760445243262455426341605998592*x^139 + 65090357020608608380485988214322417795761942738058181289710595927994916924833730263696207766561254014976*x^140 + 40019954224067631150414344064202404222594467530867512256355918938775116885030602527844363473976073125888*x^141 + 23938372600736180298053044650544406772370091791066587042475220902423070339830116893605170873658704396288*x^142 + 13923695611156579442154942641395194373930231625110910015227924103896906902642258823271185212972183060480*x^143 + 7870949277220078640580003381002517684959900079347622151467974747457934784948381268265517807025027809280*x^144 + 4321846300003785815396793990082255164659021737122971010031483606085720772957976975703736378732872466432*x^145 + 2303684702653726383611801175531035984725695664212570872704465923960015733267295718398157240683810783232*x^146 + 1191280285480861322720690976441320382702657538926541241248760966062972339440731199092470110883342712832*x^147 + 597241755159088580336821224652503334717885694900041476539509215483788284713953722802132679761288232960*x^148 + 290081920193197446570185215651875229655562931687560241950469784999125054452212466222358993806953545728*x^149 + 136393492325794939939579287433952320861969639678498730120334681939570014443947875230679816581089853440*x^150 + 62031833147612481555117561164951288294842927438547396617757376225912419136166416528352796330000646144*x^151 + 27264916908830899821503318858472890305570371363538213511730062758565396429070473015601197603786588160*x^152 + 11570593676334591835318920838843154132220561015847219400854736648996425455140581977067350358304489472*x^153 + 4736223813020119004957212954745795592972068813317626753530964537928934730890520665643234235967864832*x^154 + 1867943943579014081497629391756350696964434293525010601671937127362029506125415579192278612407484416*x^155 + 708995589480435412903654454402880016852918678938863315655854600255952965741722115447331084721717248*x^156 + 258656391949970611305507051334995844405780452736604333554773105412785868962592645195038899683983360*x^157 + 90575101117768696015439826510934223399165566629841912649758062121851304580337997501746575013052416*x^158 + 30398676885376887021848658713268529632573186890328632557116011375338553386453968181570119099482112*x^159 + 9762405012907992657984490966776426732371593069059030762187681982097749225462402994196623812198400*x^160 + 2994644040034303923303743746153882349545912036476028362311075440901677678478523341991298543386624*x^161 + 875738467920505272371162798685983303223281978297260045663516594949354414621652380554848009977856*x^162 + 243619804129235258899764327237661308380099891965149236499497268748078276767760826907054701543424*x^163 + 64317317562996962683070233356344746061030598272376525562290817903755440464498944289732344938496*x^164 + 16072093905110038427214088902200051215196257397362872032390914143685180012234824913575852638208*x^165 + 3790198699358442346886533451268095654671120748568968689086208156823494467548508871981711491072*x^166 + 840719341329143338111564346997766762187452605540924473047214625811845 ... 6682731999270419994370885785477145486142539192819566081530570830789504*x^366 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^367 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^368 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^369 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^370 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^371 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^372 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^373 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^374 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^375 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^376 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^377 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^378 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^379 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^380 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^381 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^382 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^383 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^384 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^385 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^386 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^387 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^388 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^389 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^390 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^391 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^392 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^393 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^394 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^395 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^396 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^397 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^398 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^399 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^400 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^401 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^402 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^403 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^404 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^405 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^406 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^407 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^408 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^409 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^410 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^411 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^412 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^413 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^414 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^415 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^416 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^417 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^418 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^419 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^420 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^421 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^422 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^423 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^424 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^425 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^426 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^427 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^428 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^429 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^430 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^431 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^432 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^433 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^434 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^435 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^436 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^437 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^438 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^439 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^440 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^441 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^442 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^443 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^444 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^445 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^446 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^447 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^448 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^449 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^450 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^451 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^452 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^453 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^454 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^455 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^456 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^457 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^458 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^459 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^460 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^461 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^462 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^463 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^464 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^465 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^466 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^467 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^468 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^469 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^470 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^471 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^472 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^473 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^474 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^475 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^476 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^477 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^478 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^479 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^480 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^481 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^482 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^483 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^484 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^485 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^486 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^487 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^488 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^489 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^490 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^491 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^492 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^493 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^494 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^495 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^496 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^497 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^498 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^499 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^500 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^501 + 255938479445005459301002318340195426966682731999270419994370885785477145486142539192819566081530570830789504*x^502 + O(x^503)}