pouët.net

Fibonacci

category: general [glöplog]
Fibonacci does your __int64s. Go make a demo about it.
added on the 2010-04-09 08:20:58 by kbi kbi
the formula is this:

N = B*1.44042 + 2.1399

B = number of bits
N = number in which the overflow happens

B = 32 -> N = 48
B = 64 -> N = 94
B = 128 -> N = 186
added on the 2010-04-09 09:30:20 by iq iq
[0] 0
[1] 1
[2] 1
[3] 2
[4] 3
[5] 5
[6] 8
[7] 13
[8] 21
[9] 34
[10] 55
[11] 89
[12] 144
[13] 233
[14] 377
[15] 610
[16] 987
[17] 1597
[18] 2584
[19] 4181
[20] 6765
[21] 10946
[22] 17711
[23] 28657
[24] 46368
[25] 75025
[26] 121393
[27] 196418
[28] 317811
[29] 514229
[30] 832040
[31] 1346269
[32] 2178309
[33] 3524578
[34] 5702887
[35] 9227465
[36] 14930352
[37] 24157817
[38] 39088169
[39] 63245986
[40] 102334155
[41] 165580141
[42] 267914296
[43] 433494437
[44] 701408733
[45] 1134903170
[46] 1836311903
[47] 2971215073
[48] 4807526976
[49] 7778742049
[50] 12586269025
[51] 20365011074
[52] 32951280099
[53] 53316291173
[54] 86267571272
[55] 139583862445
[56] 225851433717
[57] 365435296162
[58] 591286729879
[59] 956722026041
[60] 1548008755920
[61] 2504730781961
[62] 4052739537881
[63] 6557470319842
[64] 10610209857723
[65] 17167680177565
[66] 27777890035288
[67] 44945570212853
[68] 72723460248141
[69] 117669030460994
[70] 190392490709135
[71] 308061521170129
[72] 498454011879264
[73] 806515533049393
[74] 1304969544928657
[75] 2111485077978050
[76] 3416454622906707
[77] 5527939700884757
[78] 8944394323791464
[79] 14472334024676221
[80] 23416728348467685
[81] 37889062373143906
[82] 61305790721611591
[83] 99194853094755497
[84] 160500643816367088
[85] 259695496911122585
[86] 420196140727489673
[87] 679891637638612258
[88] 1100087778366101931
[89] 1779979416004714189
[90] 2880067194370816120
[91] 4660046610375530309
[92] 7540113804746346429
[93] 12200160415121876738
[94] 19740274219868223167
[95] 31940434634990099905
[96] 51680708854858323072
[97] 83621143489848422977
[98] 135301852344706746049
[99] 218922995834555169026
[100] 354224848179261915075
[101] 573147844013817084101
[102] 927372692193078999176
[103] 1500520536206896083277
[104] 2427893228399975082453
[105] 3928413764606871165730
[106] 6356306993006846248183
[107] 10284720757613717413913
[108] 16641027750620563662096
[109] 26925748508234281076009
[110] 43566776258854844738105
[111] 70492524767089125814114
[112] 114059301025943970552219
[113] 184551825793033096366333
[114] 298611126818977066918552
[115] 483162952612010163284885
[116] 781774079430987230203437
[117] 1264937032042997393488322
[118] 2046711111473984623691759
[119] 3311648143516982017180081
[120] 5358359254990966640871840
[121] 8670007398507948658051921
[122] 14028366653498915298923761
[123] 22698374052006863956975682
[124] 36726740705505779255899443
[125] 59425114757512643212875125
[126] 96151855463018422468774568
[127] 155576970220531065681649693
[128] 251728825683549488150424261
[129] 407305795904080553832073954
[130] 659034621587630041982498215
[131] 1066340417491710595814572169
[132] 1725375039079340637797070384
[133] 2791715456571051233611642553
[134] 4517090495650391871408712937
[135] 7308805952221443105020355490
[136] 11825896447871834976429068427
[137] 19134702400093278081449423917
[138] 30960598847965113057878492344
[139] 50095301248058391139327916261
[140] 81055900096023504197206408605
[141] 131151201344081895336534324866
[142] 212207101440105399533740733471
[143] 343358302784187294870275058337
[144] 555565404224292694404015791808
[145] 898923707008479989274290850145
[146] 1454489111232772683678306641953
[147] 2353412818241252672952597492098
[148] 3807901929474025356630904134051
[149] 6161314747715278029583501626149
[150] 9969216677189303386214405760200
[151] 16130531424904581415797907386349
[152] 26099748102093884802012313146549
[153] 42230279526998466217810220532898
[154] 68330027629092351019822533679447
[155] 110560307156090817237632754212345
[156] 178890334785183168257455287891792
[157] 289450641941273985495088042104137
[158] 468340976726457153752543329995929
[159] 757791618667731139247631372100066
[160] 1226132595394188293000174702095995
[161] 1983924214061919432247806074196061
[162] 3210056809456107725247980776292056
[163] 5193981023518027157495786850488117
[164] 8404037832974134882743767626780173
[165] 13598018856492162040239554477268290
[166] 22002056689466296922983322104048463
[167] 35600075545958458963222876581316753
[168] 57602132235424755886206198685365216
[169] 93202207781383214849429075266681969
[170] 150804340016807970735635273952047185
[171] 244006547798191185585064349218729154
[172] 394810887814999156320699623170776339
[173] 638817435613190341905763972389505493
[174] 1033628323428189498226463595560281832
[175] 1672445759041379840132227567949787325
[176] 2706074082469569338358691163510069157
[177] 4378519841510949178490918731459856482
[178] 7084593923980518516849609894969925639
[179] 11463113765491467695340528626429782121
[180] 18547707689471986212190138521399707760
[181] 30010821454963453907530667147829489881
[182] 48558529144435440119720805669229197641
[183] 78569350599398894027251472817058687522
[184] 127127879743834334146972278486287885163
[185] 205697230343233228174223751303346572685
[186] 332825110087067562321196029789634457848
[187] 538522340430300790495419781092981030533
[188] 871347450517368352816615810882615488381
[189] 1409869790947669143312035591975596518914
[190] 2281217241465037496128651402858212007295
[191] 3691087032412706639440686994833808526209
[192] 5972304273877744135569338397692020533504
[193] 9663391306290450775010025392525829059713
[194] 15635695580168194910579363790217849593217
[195] 25299086886458645685589389182743678652930
[196] 40934782466626840596168752972961528246147
[197] 66233869353085486281758142155705206899077
[198] 107168651819712326877926895128666735145224
[199] 173402521172797813159685037284371942044301
[200] 280571172992510140037611932413038677189525
[201] 453973694165307953197296969697410619233826
[202] 734544867157818093234908902110449296423351
[203] 1188518561323126046432205871807859915657177
[204] 1923063428480944139667114773918309212080528
[205] 3111581989804070186099320645726169127737705
[206] 5034645418285014325766435419644478339818233
[207] 8146227408089084511865756065370647467555938
[208] 13180872826374098837632191485015125807374171
[209] 21327100234463183349497947550385773274930109
[210] 34507973060837282187130139035400899082304280
[211] 55835073295300465536628086585786672357234389
[212] 90343046356137747723758225621187571439538669
[213] 146178119651438213260386312206974243796773058
[214] 236521166007575960984144537828161815236311727
[215] 382699285659014174244530850035136059033084785
[216] 619220451666590135228675387863297874269396512
[217] 1001919737325604309473206237898433933302481297
[218] 1621140188992194444701881625761731807571877809
[219] 2623059926317798754175087863660165740874359106
[220] 4244200115309993198876969489421897548446236915
[221] 6867260041627791953052057353082063289320596021
[222] 11111460156937785151929026842503960837766832936
[223] 17978720198565577104981084195586024127087428957
[224] 29090180355503362256910111038089984964854261893
[225] 47068900554068939361891195233676009091941690850
[226] 76159080909572301618801306271765994056795952743
[227] 123227981463641240980692501505442003148737643593
[228] 199387062373213542599493807777207997205533596336
[229] 322615043836854783580186309282650000354271239929
[230] 522002106210068326179680117059857997559804836265
[231] 844617150046923109759866426342507997914076076194
[232] 1366619256256991435939546543402365995473880912459
[233] 2211236406303914545699412969744873993387956988653
[234] 3577855662560905981638959513147239988861837901112
[235] 5789092068864820527338372482892113982249794889765
[236] 9366947731425726508977331996039353971111632790877
[237] 15156039800290547036315704478931467953361427680642
[238] 24522987531716273545293036474970821924473060471519
[239] 39679027332006820581608740953902289877834488152161
[240] 64202014863723094126901777428873111802307548623680
[241] 103881042195729914708510518382775401680142036775841
[242] 168083057059453008835412295811648513482449585399521
[243] 271964099255182923543922814194423915162591622175362
[244] 440047156314635932379335110006072428645041207574883
[245] 712011255569818855923257924200496343807632829750245
[246] 1152058411884454788302593034206568772452674037325128
[247] 1864069667454273644225850958407065116260306867075373
[248] 3016128079338728432528443992613633888712980904400501
[249] 4880197746793002076754294951020699004973287771475874
[250] 7896325826131730509282738943634332893686268675876375
[251] 12776523572924732586037033894655031898659556447352249
[252] 20672849399056463095319772838289364792345825123228624
[253] 33449372971981195681356806732944396691005381570580873
[254] 54122222371037658776676579571233761483351206693809497
[255] 87571595343018854458033386304178158174356588264390370
[256] 141693817714056513234709965875411919657707794958199867
[257] 229265413057075367692743352179590077832064383222590237
[258] 370959230771131880927453318055001997489772178180790104
[259] 600224643828207248620196670234592075321836561403380341
[260] 971183874599339129547649988289594072811608739584170445
[261] 1571408518427546378167846658524186148133445300987550786
[262] 2542592393026885507715496646813780220945054040571721231
[263] 4114000911454431885883343305337966369078499341559272017
[264] 6656593304481317393598839952151746590023553382130993248
[265] 10770594215935749279482183257489712959102052723690265265
[266] 17427187520417066673081023209641459549125606105821258513
[267] 28197781736352815952563206467131172508227658829511523778
[268] 45624969256769882625644229676772632057353264935332782291
[269] 73822750993122698578207436143903804565580923764844306069
[270] 119447720249892581203851665820676436622934188700177088360
[271] 193270471243015279782059101964580241188515112465021394429
[272] 312718191492907860985910767785256677811449301165198482789
[273] 505988662735923140767969869749836918999964413630219877218
[274] 818706854228831001753880637535093596811413714795418360007
[275] 1324695516964754142521850507284930515811378128425638237225
[276] 2143402371193585144275731144820024112622791843221056597232
[277] 3468097888158339286797581652104954628434169971646694834457
[278] 5611500259351924431073312796924978741056961814867751431689
[279] 9079598147510263717870894449029933369491131786514446266146
[280] 14691098406862188148944207245954912110548093601382197697835
[281] 23770696554372451866815101694984845480039225387896643963981
[282] 38461794961234640015759308940939757590587318989278841661816
[283] 62232491515607091882574410635924603070626544377175485625797
[284] 100694286476841731898333719576864360661213863366454327287613
[285] 162926777992448823780908130212788963731840407743629812913410
[286] 263621064469290555679241849789653324393054271110084140201023
[287] 426547842461739379460149980002442288124894678853713953114433
[288] 690168906931029935139391829792095612517948949963798093315456
[289] 1116716749392769314599541809794537900642843628817512046429889
[290] 1806885656323799249738933639586633513160792578781310139745345
[291] 2923602405716568564338475449381171413803636207598822186175234
[292] 4730488062040367814077409088967804926964428786380132325920579
[293] 7654090467756936378415884538348976340768064993978954512095813
[294] 12384578529797304192493293627316781267732493780359086838016392
[295] 20038668997554240570909178165665757608500558774338041350112205
[296] 32423247527351544763402471792982538876233052554697128188128597
[297] 52461916524905785334311649958648296484733611329035169538240802
[298] 84885164052257330097714121751630835360966663883732297726369399
[299] 137347080577163115432025771710279131845700275212767467264610201
[300] 222232244629420445529739893461909967206666939096499764990979600
[301] 359579325206583560961765665172189099052367214309267232255589801
[302] 581811569836004006491505558634099066259034153405766997246569401
[303] 941390895042587567453271223806288165311401367715034229502159202
[304] 1523202464878591573944776782440387231570435521120801226748728603
[305] 2464593359921179141398048006246675396881836888835835456250887805
[306] 3987795824799770715342824788687062628452272409956636682999616408
[307] 6452389184720949856740872794933738025334109298792472139250504213
[308] 10440185009520720572083697583620800653786381708749108822250120621
[309] 16892574194241670428824570378554538679120491007541580961500624834
[310] 27332759203762391000908267962175339332906872716290689783750745455
[311] 44225333398004061429732838340729878012027363723832270745251370289
[312] 71558092601766452430641106302905217344934236440122960529002115744
[313] 115783425999770513860373944643635095356961600163955231274253486033
[314] 187341518601536966291015050946540312701895836604078191803255601777
[315] 303124944601307480151388995590175408058857436768033423077509087810
[316] 490466463202844446442404046536715720760753273372111614880764689587
[317] 793591407804151926593793042126891128819610710140145037958273777397
[318] 1284057871006996373036197088663606849580363983512256652839038466984
[319] 2077649278811148299629990130790497978399974693652401690797312244381
[320] 3361707149818144672666187219454104827980338677164658343636350711365
[321] 5439356428629292972296177350244602806380313370817060034433662955746
[322] 8801063578447437644962364569698707634360652047981718378070013667111
[323] 14240420007076730617258541919943310440740965418798778412503676622857
[324] 23041483585524168262220906489642018075101617466780496790573690289968
[325] 37281903592600898879479448409585328515842582885579275203077366912825
[326] 60323387178125067141700354899227346590944200352359771993651057202793
[327] 97605290770725966021179803308812675106786783237939047196728424115618
[328] 157928677948851033162880158208040021697730983590298819190379481318411
[329] 255533968719576999184059961516852696804517766828237866387107905434029
[330] 413462646668428032346940119724892718502248750418536685577487386752440
[331] 668996615388005031531000081241745415306766517246774551964595292186469
[332] 1082459262056433063877940200966638133809015267665311237542082678938909
[333] 1751455877444438095408940282208383549115781784912085789506677971125378
[334] 2833915139500871159286880483175021682924797052577397027048760650064287
[335] 4585371016945309254695820765383405232040578837489482816555438621189665
[336] 7419286156446180413982701248558426914965375890066879843604199271253952
[337] 12004657173391489668678522013941832147005954727556362660159637892443617
[338] 19423943329837670082661223262500259061971330617623242503763837163697569
[339] 31428600503229159751339745276442091208977285345179605163923475056141186
[340] 50852543833066829834000968538942350270948615962802847667687312219838755
[341] 82281144336295989585340713815384441479925901307982452831610787275979941
[342] 133133688169362819419341682354326791750874517270785300499298099495818696
[343] 215414832505658809004682396169711233230800418578767753330908886771798637
[344] 348548520675021628424024078524038024981674935849553053830206986267617333
[345] 563963353180680437428706474693749258212475354428320807161115873039415970
[346] 912511873855702065852730553217787283194150290277873860991322859307033303
[347] 1476475227036382503281437027911536541406625644706194668152438732346449273
[348] 2388987100892084569134167581129323824600775934984068529143761591653482576
[349] 3865462327928467072415604609040860366007401579690263197296200323999931849
[350] 6254449428820551641549772190170184190608177514674331726439961915653414425
[351] 10119911756749018713965376799211044556615579094364594923736162239653346274
[352] 16374361185569570355515148989381228747223756609038926650176124155306760699
[353] 26494272942318589069480525788592273303839335703403521573912286394960106973
[354] 42868634127888159424995674777973502051063092312442448224088410550266867672
[355] 69362907070206748494476200566565775354902428015845969798000696945226974645
[356] 112231541198094907919471875344539277405965520328288418022089107495493842317
[357] 181594448268301656413948075911105052760867948344134387820089804440720816962
[358] 293825989466396564333419951255644330166833468672422805842178911936214659279
[359] 475420437734698220747368027166749382927701417016557193662268716376935476241
[360] 769246427201094785080787978422393713094534885688979999504447628313150135520
[361] 1244666864935793005828156005589143096022236302705537193166716344690085611761
[362] 2013913292136887790908943984011536809116771188394517192671163973003235747281
[363] 3258580157072680796737099989600679905139007491100054385837880317693321359042
[364] 5272493449209568587646043973612216714255778679494571578509044290696557106323
[365] 8531073606282249384383143963212896619394786170594625964346924608389878465365
[366] 13803567055491817972029187936825113333650564850089197542855968899086435571688
[367] 22334640661774067356412331900038009953045351020683823507202893507476314037053
[368] 36138207717265885328441519836863123286695915870773021050058862406562749608741
[369] 58472848379039952684853851736901133239741266891456844557261755914039063645794
[370] 94611056096305838013295371573764256526437182762229865607320618320601813254535
[371] 153083904475345790698149223310665389766178449653686710164582374234640876900329
[372] 247694960571651628711444594884429646292615632415916575771902992555242690154864
[373] 400778865046997419409593818195095036058794082069603285936485366789883567055193
[374] 648473825618649048121038413079524682351409714485519861708388359345126257210057
[375] 1049252690665646467530632231274619718410203796555123147644873726135009824265250
[376] 1697726516284295515651670644354144400761613511040643009353262085480136081475307
[377] 2746979206949941983182302875628764119171817307595766156998135811615145905740557
[378] 4444705723234237498833973519982908519933430818636409166351397897095281987215864
[379] 7191684930184179482016276395611672639105248126232175323349533708710427892956421
[380] 11636390653418416980850249915594581159038678944868584489700931605805709880172285
[381] 18828075583602596462866526311206253798143927071100759813050465314516137773128706
[382] 30464466237021013443716776226800834957182606015969344302751396920321847653300991
[383] 49292541820623609906583302538007088755326533087070104115801862234837985426429697
[384] 79757008057644623350300078764807923712509139103039448418553259155159833079730688
[385] 129049549878268233256883381302815012467835672190109552534355121389997818506160385
[386] 208806557935912856607183460067622936180344811293149000952908380545157651585891073
[387] 337856107814181089864066841370437948648180483483258553487263501935155470092051458
[388] 546662665750093946471250301438060884828525294776407554440171882480313121677942531
[389] 884518773564275036335317142808498833476705778259666107927435384415468591769993989
[390] 1431181439314368982806567444246559718305231073036073662367607266895781713447936520
[391] 2315700212878644019141884587055058551781936851295739770295042651311250305217930509
[392] 3746881652193013001948452031301618270087167924331813432662649918207032018665867029
[393] 6062581865071657021090336618356676821869104775627553202957692569518282323883797538
[394] 9809463517264670023038788649658295091956272699959366635620342487725314342549664567
[395] 15872045382336327044129125268014971913825377475586919838578035057243596666433462105
[396] 25681508899600997067167913917673267005781650175546286474198377544968911008983126672
[397] 41553554281937324111297039185688238919607027651133206312776412602212507675416588777
[398] 67235063181538321178464953103361505925388677826679492786974790147181418684399715449
[399] 108788617463475645289761992289049744844995705477812699099751202749393926359816304226
[400] 176023680645013966468226945392411250770384383304492191886725992896575345044216019675
[401] 284812298108489611757988937681460995615380088782304890986477195645969271404032323901
[402] 460835978753503578226215883073872246385764472086797082873203188542544616448248343576
[403] 745648276861993189984204820755333242001144560869101973859680384188513887852280667477
[404] 1206484255615496768210420703829205488386909032955899056732883572731058504300529011053
[405] 1952132532477489958194625524584538730388053593825001030592563956919572392152809678530
[406] 3158616788092986726405046228413744218774962626780900087325447529650630896453338689583
[407] 5110749320570476684599671752998282949163016220605901117918011486570203288606148368113
[408] 8269366108663463411004717981412027167937978847386801205243459016220834185059487057696
[409] 13380115429233940095604389734410310117100995067992702323161470502791037473665635425809
[410] 21649481537897403506609107715822337285038973915379503528404929519011871658725122483505
[411] 35029596967131343602213497450232647402139968983372205851566400021802909132390757909314
[412] 56679078505028747108822605166054984687178942898751709379971329540814780791115880392819
[413] 91708675472160090711036102616287632089318911882123915231537729562617689923506638302133
[414] 148387753977188837819858707782342616776497854780875624611509059103432470714622518694952
[415] 240096429449348928530894810398630248865816766662999539843046788666050160638129156997085
[416] 388484183426537766350753518180972865642314621443875164454555847769482631352751675692037
[417] 628580612875886694881648328579603114508131388106874704297602636435532791990880832689122
[418] 1017064796302424461232401846760575980150446009550749868752158484205015423343632508381159
[419] 1645645409178311156114050175340179094658577397657624573049761120640548215334513341070281
[420] 2662710205480735617346452022100755074809023407208374441801919604845563638678145849451440
[421] 4308355614659046773460502197440934169467600804865999014851680725486111854012659190521721
[422] 6971065820139782390806954219541689244276624212074373456653600330331675492690805039973161
[423] 11279421434798829164267456416982623413744225016940372471505281055817787346703464230494882
[424] 18250487254938611555074410636524312658020849229014745928158881386149462839394269270468043
[425] 29529908689737440719341867053506936071765074245955118399664162441967250186097733500962925
[426] 47780395944676052274416277690031248729785923474969864327823043828116713025492002771430968
[427] 77310304634413492993758144743538184801550997720924982727487206270083963211589736272393893
[428] 125090700579089545268174422433569433531336921195894847055310250098200676237081739043824861
[429] 202401005213503038261932567177107618332887918916819829782797456368284639448671475316218754
[430] 327491705792592583530106989610677051864224840112714676838107706466485315685753214360043615
[431] 529892711006095621792039556787784670197112759029534506620905162834769955134424689676262369
[432] 857384416798688205322146546398461722061337599142249183459012869301255270820177904036305984
[433] 1387277127804783827114186103186246392258450358171783690079918032136025225954602593712568353
[434] 2244661544603472032436332649584708114319787957314032873538930901437280496774780497748874337
[435] 3631938672408255859550518752770954506578238315485816563618848933573305722729383091461442690
[436] 5876600217011727891986851402355662620898026272799849437157779835010586219504163589210317027
[437] 9508538889419983751537370155126617127476264588285666000776628768583891942233546680671759717
[438] 15385139106431711643524221557482279748374290861085515437934408603594478161737710269882076744
[439] 24893677995851695395061591712608896875850555449371181438711037372178370103971256950553836461
[440] 40278817102283407038585813270091176624224846310456696876645445975772848265708967220435913205
[441] 65172495098135102433647404982700073500075401759827878315356483347951218369680224170989749666
[442] 105451312200418509472233218252791250124300248070284575192001929323724066635389191391425662871
[443] 170623807298553611905880623235491323624375649830112453507358412671675285005069415562415412537
[444] 276075119498972121378113841488282573748675897900397028699360341995399351640458606953841075408
[445] 446698926797525733283994464723773897373051547730509482206718754667074636645528022516256487945
[446] 722774046296497854662108306212056471121727445630906510906079096662473988285986629470097563353
[447] 1169472973094023587946102770935830368494778993361415993112797851329548624931514651986354051298
[448] 1892247019390521442608211077147886839616506438992322504018876947992022613217501281456451614651
[449] 3061719992484545030554313848083717208111285432353738497131674799321571238149015933442805665949
[450] 4953967011875066473162524925231604047727791871346061001150551747313593851366517214899257280600
[451] 8015687004359611503716838773315321255839077303699799498282226546635165089515533148342062946549
[452] 12969654016234677976879363698546925303566869175045860499432778293948758940882050363241320227149
[453] 20985341020594289480596202471862246559405946478745659997715004840583924030397583511583383173698
[454] 33954995036828967457475566170409171862972815653791520497147783134532682971279633874824703400847
[455] 54940336057423256938071768642271418422378762132537180494862787975116607001677217386408086574545
[456] 88895331094252224395547334812680590285351577786328700992010571109649289972956851261232789975392
[457] 143835667151675481333619103454952008707730339918865881486873359084765896974634068647640876549937
[458] 232730998245927705729166438267632598993081917705194582478883930194415186947590919908873666525329
[459] 376566665397603187062785541722584607700812257624060463965757289279181083922224988556514543075266
[460] 609297663643530892791951979990217206693894175329255046444641219473596270869815908465388209600595
[461] 985864329041134079854737521712801814394706432953315510410398508752777354792040897021902752675861
[462] 1595161992684664972646689501703019021088600608282570556855039728226373625661856805487290962276456
[463] 2581026321725799052501427023415820835483307041235886067265438236979150980453897702509193714952317
[464] 4176188314410464025148116525118839856571907649518456624120477965205524606115754507996484677228773
[465] 6757214636136263077649543548534660692055214690754342691385916202184675586569652210505678392181090
[466] 10933402950546727102797660073653500548627122340272799315506394167390200192685406718502163069409863
[467] 17690617586682990180447203622188161240682337031027142006892310369574875779255058929007841461590953
[468] 28624020537229717283244863695841661789309459371299941322398704536965075971940465647510004531000816
[469] 46314638123912707463692067318029823029991796402327083329291014906539951751195524576517845992591769
[470] 74938658661142424746936931013871484819301255773627024651689719443505027723135990224027850523592585
[471] 121253296785055132210628998331901307849293052175954107980980734350044979474331514800545696516184354
[472] 196191955446197556957565929345772792668594307949581132632670453793550007197467505024573547039776939
[473] 317445252231252689168194927677674100517887360125535240613651188143594986671799019825119243555961293
[474] 513637207677450246125760857023446893186481668075116373246321641937144993869266524849692790595738232
[475] 831082459908702935293955784701120993704369028200651613859972830080739980541065544674812034151699525
[476] 1344719667586153181419716641724567886890850696275767987106294472017884974410332069524504824747437757
[477] 2175802127494856116713672426425688880595219724476419600966267302098624954951397614199316858899137282
[478] 3520521795081009298133389068150256767486070420752187588072561774116509929361729683723821683646575039
[479] 5696323922575865414847061494575945648081290145228607189038829076215134884313127297923138542545712321
[480] 9216845717656874712980450562726202415567360565980794777111390850331644813674856981646960226192287360
[481] 14913169640232740127827512057302148063648650711209401966150219926546779697987984279570098768737999681
[482] 24130015357889614840807962620028350479216011277190196743261610776878424511662841261217058994930287041
[483] 39043184998122354968635474677330498542864661988399598709411830703425204209650825540787157763668286722
[484] 63173200356011969809443437297358849022080673265589795452673441480303628721313666802004216758598573763
[485] 102216385354134324778078911974689347564945335253989394162085272183728832930964492342791374522266860485
[486] 165389585710146294587522349272048196587026008519579189614758713664032461652278159144795591280865434248
[487] 267605971064280619365601261246737544151971343773568583776843985847761294583242651487586965803132294733
[488] 432995556774426913953123610518785740738997352293147773391602699511793756235520810632382557083997728981
[489] 700601527838707533318724871765523284890968696066716357168446685359555050818763462119969522887130023714
[490] 1133597084613134447271848482284309025629966048359864130560049384871348807054284272752352079971127752695
[491] 1834198612451841980590573354049832310520934744426580487728496070230903857873047734872321602858257776409
[492] 2967795697064976427862421836334141336150900792786444618288545455102252664927332007624673682829385529104
[493] 4801994309516818408452995190383973646671835537213025106017041525333156522800379742496995285687643305513
[494] 7769790006581794836315417026718114982822736329999469724305586980435409187727711750121668968517028834617
[495] 12571784316098613244768412217102088629494571867212494830322628505768565710528091492618664254204672140130
[496] 20341574322680408081083829243820203612317308197211964554628215486203974898255803242740333222721700974747
[497] 32913358638779021325852241460922292241811880064424459384950843991972540608783894735358997476926373114877
[498] 53254932961459429406936070704742495854129188261636423939579059478176515507039697978099330699648074089624
[499] 86168291600238450732788312165664788095941068326060883324529903470149056115823592713458328176574447204501
[500] 139423224561697880139724382870407283950070256587697307264108962948325571622863290691557658876222521294125
added on the 2010-04-09 10:15:20 by Skate Skate
Someone please make a graph out of the ratios of each consecutive number pair:

0,1
1,2
3,5
8,13
21,34
55,89
144,233

That's the real magic behind this pattern ;)
BB Image
added on the 2010-04-09 10:25:50 by d0DgE d0DgE
Quote:
Who is going for GMP now ?

Why use GMP when you can use SockZ?

Code: 1 0 1 ;f(n) f(n-1) n .loop COPY "f(" PRINT ")=" 3 OVER PRINT CR 3 SWAP ;n f(n-1) f(n) SWAP2 ;n f(n) f(n-1) OVER2 ;n f(n) f(n-1) f(n) + ;n f(n) f(n+1)=f(n-1)+f(n) 3 SWAP ;f(n+1) f(n) n 1 + ;f(n+1) f(n) n+1 COPY 502 SKIP= loop END


And then:
f(500)=139423224561697880139724382870407283950070256587697307264108962948325571622863290691557658876222521294125
f(501)=225591516161936330872512695036072072046011324913758190588638866418474627738686883405015987052796968498626
added on the 2010-04-09 11:57:55 by baah baah
Quote:
Go make a demo about it

I did ;D
added on the 2010-04-09 14:19:15 by d0DgE d0DgE
I'll take your sweaty sockz and raise you with some erlang. (Obviously tail call recursive)

fibseq() ->
fibout(0,0),
fibseq(1,1,0).

fibseq(Num,Cur,Prev) when Num=<505 ->
fibout(Num,Cur),
Next=Cur+Prev,
fibseq(Num+1,Next,Cur);
fibseq(_,_,_) ->
done.

fibout(Num,Cur) ->
io:format("fib(~b)=~b~n",[Num,Cur]).

---------------------------------------------------------
46> test:fibseq().
fib(0)=0
fib(1)=1
fib(2)=1
fib(3)=2
fib(4)=3
fib(5)=5
........
........
fib(501)=225591516161936330872512695036072072046011324913758190588638866418474627738686883405015987052796968498626
fib(502)=365014740723634211012237077906479355996081581501455497852747829366800199361550174096573645929019489792751
fib(503)=590606256885570541884749772942551428042092906415213688441386695785274827100237057501589632981816458291377
fib(504)=955620997609204752896986850849030784038174487916669186294134525152075026461787231598163278910835948084128
fib(505)=1546227254494775294781736623791582212080267394331882874735521220937349853562024289099752911892652406375505
done
47>
added on the 2010-04-09 16:47:13 by whizzter whizzter
Hit me with some bbcode to get the erlang code to look right.

Code:fibseq() -> fibout(0,0), fibseq(1,1,0). fibseq(Num,Cur,Prev) when Num=<505 -> fibout(Num,Cur), Next=Cur+Prev, fibseq(Num+1,Next,Cur); fibseq(_,_,_) -> done. fibout(Num,Cur) -> io:format("fib(~b)=~b~n",[Num,Cur]).

added on the 2010-04-09 16:49:46 by whizzter whizzter
bah, humbug

mov ch, 2
mov di, cx
rep stosb
inc ax
mov ch, 120
loop1:
stosb
mov al, [di-160]
adc al, [di-80]
aaa
loop loop1
mov ch, 120
loop2:
dec di
mov dl, [di]
add dl, '0'
mov ah, 2
int 21h
loop loop2
ret
added on the 2010-04-09 17:17:13 by 216 216
funny trick.. tmdc next?
added on the 2010-04-09 17:48:02 by whizzter whizzter
Skate pwns.
added on the 2010-04-09 19:56:04 by ferris ferris
8bit always wins ;)
added on the 2010-04-09 20:24:18 by Skate Skate
Code: def number2bin(x): out = [] while x: out.append( x%2 ) x /= 2 out.reverse() return out def jump( p, c ): return p*p+c*c, (2*p+c)*c def step( p, c ): return c, p+c def fibTravel(n): marsenNumber = 2**4423-1 #quite large finite field path = number2bin(n) p,c = 1,0 #starting point for i in path[:-1]: #print "wow %s"%i if i: p,c = step( p,c ) p,c = jump( p,c ) p = p % marsenNumber c = c % marsenNumber if path[-1]: p,c = step( p,c ) return c


f[506]=2501848252103980047678723474640612996118441882248552061029655746089424880023811520697916190803488354459633
f[507]=4048075506598755342460460098432195208198709276580434935765176967026774733585835809797669102696140760835138
f[508]=6549923758702735390139183573072808204317151158828986996794832713116199613609647330495585293499629115294771

and now... PANTS OFF (klękać do miecza)
f[47239817523981479281579218712460998291842112345432721649875243104932184651324] mod 2^4423 -1 =

124213441849311985446486018309175024933475033276087063062089696248033101910610427635944517630958231376181716158561902062371516742409767758834435441405570893269249045060256125990371877912044148825319792686909561776306751418472751588433411263723013321390378299378413993894937287864425061640881684362299476227148562973478775910386785676258243180956427734699057184286328519447284384469511322517622057287637919668717996977676163388867902453438587927215439632731538997024220685467385937038336095682959238648592241561516284581604489249622627216449129369061099892823550416514323544641692378708504640765043123163318928255548543957067332112463484216126702609406073311143762026062827561146120396373940437387398678415643698370242621975322052191638544935846743517542902304555879808794367931137441796327573084270351315207131292438782293490185898684059165752267235422780507663341695583588502263319754618902661335400774394074803945936754341743709054774672091572058751408911933004591460552901569464354487149619654667716213162432851863195378417417600569604094987479437247031071156110463537773293271210539186992574788335622957102826912974617335683942840251069600758338551361399313453525280113905544366649972992200703001732891903378470158218905574164778990136504502389519632463305011739190433881567910845452607508467238819291659562069131629834756078711

time computing < 1[s] :)
added on the 2010-04-11 12:33:53 by krzyzan krzyzan
Ok, lets play with Fibonacci numbers and... intros 256b. :)
Intro 256 is just a sequence of bits, isn't it? - so, it could be turn into natural number. Quick and easy code:
Code: import fib #his is the file from my last post def introNumber(): f = open("puls.com","rb") #yeah.. this is THIS pulse 256b intro try: byte = f.read(1) index=0 sum=0 while byte != "": val = int(byte.encode('hex'), 16) sum += val*(256**index) byte = f.read(1) index += 1 finally: f.close() return sum print introNumber() print "--------------------------" print fib.fibTravel( introNumber() )


I took famous "puls.com" (by Rrrola), and this is its 'cardinal' number:
N=24690664190877577863735026143204829428400636123616184013657436330923929759807169312891548985841320838430606346600701597160176067658946940952081310487644041301399425716762418092371943992503766295923098750083587105426035587821110314006728025461173822613996696154500985926597060896584077024948909961013674874687933405515561348255854377601447793234032598684705213532461873882287131900652785679897636660207612839176782238414004955599453527014398653898669331941852252053786290887760870160484763311038944231731218062374572171434998015433563299845892454555749208637453597117970206952510950529863791439474064675977657075307440

And this is N'th Fibonacci number:
F[N] mod 2^4423-1= 249349349797732314358551559033855664958972652807101321853717325428222442911180916905942322999775721778569959454821189325432976614689834413352442505725887212940869379972449730472843212244846846359391447505803445262075294244323721204339373013535239988015766355010923416879351136789393617315197620047147993987661324807264215557813667859344792337426617615799832425616817647605010483062934675447046400940627349014219808252042326080771315042637147928111096210538032962615571575488998909640503876815636732057727673712290181872687981444075318315196048953422139464899558810018747378161128600616589080589046827649894520783449062553368802246840999872266221732401094009483353951684977538862878157216289520665952330438861977150901612148980960074778754716816620128599529600384488466344199792584686150943332014913655690480055395646925270183205618635881567153235346177483753932319237068794106550743326310472900442200976021302629880126165820208805273508699554081700320287984246077819565231287660119565023980125109649821779019270131086768604833136342322826503114003866468651608244157944803243737449221209460500736325145846349585292855968904099856064929512547098293618926362440584649881369288432947330490987740802498376395277905692060462819060116891667801828525471606152794615330607612147833699202118470905604162235159752114477201234865669171370024546


Or.. we can note it as follows
F( BB Image ) mod 2^4423-1 =
249349349797732314358551559033855664958972652807101321853717325428222442911180916905942322999775721778569959454821189325432976614689834413352442505725887212940869379972449730472843212244846846359391447505803445262075294244323721204339373013535239988015766355010923416879351136789393617315197620047147993987661324807264215557813667859344792337426617615799832425616817647605010483062934675447046400940627349014219808252042326080771315042637147928111096210538032962615571575488998909640503876815636732057727673712290181872687981444075318315196048953422139464899558810018747378161128600616589080589046827649894520783449062553368802246840999872266221732401094009483353951684977538862878157216289520665952330438861977150901612148980960074778754716816620128599529600384488466344199792584686150943332014913655690480055395646925270183205618635881567153235346177483753932319237068794106550743326310472900442200976021302629880126165820208805273508699554081700320287984246077819565231287660119565023980125109649821779019270131086768604833136342322826503114003866468651608244157944803243737449221209460500736325145846349585292855968904099856064929512547098293618926362440584649881369288432947330490987740802498376395277905692060462819060116891667801828525471606152794615330607612147833699202118470905604162235159752114477201234865669171370024546


So... equation:
F[ intro256 ] mod q = x
is easy to solve... what about
F[x] mod q = intro256 ? :)

Another question is, how set q number (finite filed)? I have just taken 2**4423-1, which is prime number.

Aha, there is one mistake in my fibTravel function - there should be:
Code: if path[-1]: p,c = step( p,c ) p = p % marsenNumber c = c % marsenNumber return c


bye!
added on the 2010-04-11 15:25:09 by krzyzan krzyzan
Quote:

So... equation:
F[ intro256 ] mod q = x
is easy to solve... what about
F[x] mod q = intro256 ? :)


We are not sure that g(x)=(fib(x) mod q) is an injection (and i see no simple reason why it would be so). We shall check if there exist two numbers N, M such that g(N)=g(M)...
Also in the second part, shall not q be 2^256 to have a 256b intro as a result?
added on the 2010-04-11 16:37:31 by baah baah
Quote:

Also in the second part, shall not q be 2^256 to have a 256b intro as a result?

Yeah, if want 256b intro it should be 256^256 = 2^8*256 =2^2048 but... I think that it will be better if it will be prime number. Ex.16'th Mearsenn number 2^2203-1
http://en.wikipedia.org/wiki/Mersenne_prime
Why? I don't know - but if there is prime number, every formula is smarter. :P

And one small point. If q is prime, it is called 'finite filed' and there is a lot of webpages about its properties
added on the 2010-04-12 09:03:49 by krzyzan krzyzan
'finite field'. Once is a typo, twice a coincidence?

fib(x) mod 11 repeats the sequence 1,1,2,3,5,8,2,10,1,0. There's no solution for 4, 6, 7 and 9. Considering that 11 is a prime I doubt 2^2203-1 works any better than 2^2048.
added on the 2010-04-12 09:46:54 by 216 216
Quote:
...should be 256^256 = 2^8*256 =2^2048

Ooops... You're right, i forgot a byte has 8 bits! Shame on me! ;p
added on the 2010-04-12 12:09:40 by baah baah
Quote:

'finite field'. Once is a typo, twice a coincidence?

It was just a typo - finite field is correct of course
Quote:

fib(x) mod 11 repeats the sequence 1,1,2,3,5,8,2,10,1,0. There's no solution for 4, 6, 7 and 9. Considering that 11 is a prime I doubt 2^2203-1 works any better than 2^2048.

Yes, it is absolutely true. I found that such sequences are called Pisano periods

But...
On the other hand, not all numbers from 0...256^256 are properly constructed binaries for x86
added on the 2010-04-12 12:20:02 by krzyzan krzyzan

login