Sharedsage-8.8.ipynbOpen in CoCalc
Author: Harald Schilly
Views : 90

SageMath 8.8 on CoCalc

Kernel: SageMath 8.8

In [1]:
version()
'SageMath version 8.8, Release Date: 2019-06-26'
In [2]:
EllipticCurve('420a').plot()
In [5]:
var('a b c d k') d = 19 k = 0 c = d^(1/3) N(c) a = continued_fraction(c) print(convergents(a))
lazy list [2, 3, 8/3, ...]
In [6]:
b = a.convergent(k) print(b)
2
In [7]:
a.convergent(2)
8/3
In [2]:
var(' a c d ') d = 7 c = d^(1/3) a = continued_fraction(c) convs = convergents(a) convs[:100].list()
[1, 2, 21/11, 44/23, 725/379, 1494/781, 2219/1160, 10370/5421, 22959/12002, 33329/17423, 722868/377885, 756197/395308, 2991459/1563809, 15713492/8214353, 18704951/9778162, 53123394/27770677, 71828345/37548839, 124951739/65319516, 321731823/168187871, 3664001792/1915386097, 18641740783/9745118356, 22305742575/11660504453, 85558968508/44726631715, 107864711083/56387136168, 301288390674/157500904051, 8242651259281/4308911545545, 33271893427798/17393147086231, 41514544687079/21702058631776, 11740373495184076/6137373681247063, 93964502506159687/49120691508608280, 105704876001343763/55258065189855343, 305374254508847213/159636821888318966, 411079130510190976/214894887078174309, 716453385019038189/374531708966493275, 2560439285567305543/1338490013977654134, 3276892670586343732/1713021722944147409, 12391117297326336739/6477555182810096361, 28059127265239017210/14668132088564340131, 180745880888760439999/94486347714196137147, 751042650820280777206/392613522945348888719, 931788531709041217205/487099870659545025866, 2614619714238363211616/1366813264264438940451, 3546408245947404428821/1853913134923983966317, 20346660943975385355721/10636378938884358772036, 23893069189922789784542/12490292073808342738353, 44239730133898175140263/23126671012692701510389, 112372529457719140065068/58743634099193745759131, 156612259591617315205331/81870305111886447269520, 268984789049336455270399/140613939211080193028651, 425597048640953770475730/222484244322966640298171, 1545775934972197766697589/808066672179980113923164, 3517148918585349303870908/1838617588682926868144499, 29682967283654992197664853/15517007381643395059079156, 33200116202240341501535761/17355624970326321927223655, 96083199688135675200736375/50228257322296038913526466, 225366515578511691903008511/117812139614918399754276587, 997549262002182442812770419/521476815781969637930632814, 5213112825589423905966860606/2725196218524766589407440657, 6210662087591606348779631025/3246673034306736227338073471, 11423774913181030254746491631/5971869252831502816745514128, 417466558962108695519653329741/218233966136240837630176582079, 428890333875289725774399821372/224205835389072340446922096207, 846356892837398421294053151113/442439801525313178077098678286, 1275247226712688147068452972485/666645636914385518524020774493, 2121604119550086568362506123598/1109085438439698696601119452779, 5518455465812861283793465219681/2884816513793782911726259680051, 7640059585362947852155971343279/3993901952233481608327379132830, 20798574636538756988105407906239/10872620418260746128381017945711, 652395873318064414483423616436688/341045134918316611588138935449871, 1325590321272667585954952640779615/692962890254893969304658888845453, 1977986194590732000438376257216303/1034008025173210580892797824295324, 3303576515863399586393328897995918/1726970915428104550197456713140777, 25103021805634529105191678543187729/13122804433169942432274994816280763, 28406598321497928691585007441183647/14849775348598046982472451529421540, 53509620127132457796776685984371376/27972579781767989414747446345702303, 81916218448630386488361693425555023/42822355130366036397219897875123843, 135425838575762844285138379409926399/70794934912134025811967344220826146, 894471249903207452199191969885113417/467591964603170191269023963200080719, 6396724587898215009679482168605720318/3343938687134325364695135086621391179, 39274818777292497510276084981519435325/20531224087409122379439834482928427793, 202770818474360702561059907076202896943/106000059124179937261894307501263530144, 1458670548097817415437695434514939713926/762531637956668683212699986991773138801, 1661441366572178117998755341591142610869/868531697080848620474594294493036668945, 11427318747530886123430227484061795379140/5973721820441760406060265753949993152471, 13088760114103064241428982825652937990009/6842253517522609026534860048443029821416, 89959879432149271572004124437979423319194/47027242925577414565269426044608172080967, 822727675003446508389466102767467747862755/430087439847719340113959694449916578550119, 5026325929452828321908800741042785910495724/2627551882011893455249027592744107643381681, 523560624338097591986904743171217202439418051/273695483169084638686012829339837111490244943, 2622829447619940788256432516597128798107585979/1371104967727435086885313174291929665094606396, 87076932395796143604449177790876467539989755358/45520159418174442505901347580973516059612256011, 699238288613989089623849854843608869118025628843/365532380313122975134096093822080058141992654484, 1485553509623774322852148887478094205776041013044/776584920044420392774093535225133632343597564979, 2184791798237763412475998742321703074894066641887/1142117300357543367908189629047213690485590219463, 3670345307861537735328147629799797280670107654931/1918702220401963760682283164272347322829187784442, 5855137106099301147804146372121500355564174296818/3060819520759507128590472793319561013314778003905, 38801167944457344622153025862528799414055153435839/20283619344959006532225119924189713402717855807872, 83457472995013990392110198097179099183674481168496/43628058210677520193040712641698987818750489619649, 122258640939471335014263223959707898597729634604335/63911677555636526725265832565888701221468345427521, 205716113934485325406373422056886997781404115772831/107539735766314046918306545207587689040218835047170]
In [ ]: