Forums

Fibonacci sequence

Quick find code: 55-56-974-60029865

Mugger759

Mugger759

Posts: 5,705 Rune Posts by user Forum Profile RuneMetrics Profile
#191 2,281,217,241,465,037,496,128,651,402,858,212,007,295
#192 3,691,087,032,412,706,639,440,686,994,833,808,526,209
#193 5,972,304,273,877,744,135,569,338,397,692,020,533,504
#194 9,663,391,306,290,450,775,010,025,392,525,829,059,713
#195 15,635,695,580,168,194,910,579,363,790,217,849,593,217
#196 25,299,086,886,458,645,685,589,389,182,743,678,652,930
#197 40,934,782,466,626,840,596,168,752,972,961,528,246,147
#198 66,233,869,353,085,486,281,758,142,155,705,206,899,077
#199 107,168,651,819,712,326,877,926,895,128,666,735,145,224
#200 173,402,521,172,797,813,159,685,037,284,371,942,044,301
#201 280,571,172,992,510,140,037,611,932,413,038,677,189,525
#202 453,973,694,165,307,953,197,296,969,697,410,619,233,826
#203 734,544,867,157,818,093,234,908,902,110,449,296,423,351
#204 1,188,518,561,323,126,046,432,205,871,807,859,915,657,177
#205 1,923,063,428,480,944,139,667,114,773,918,309,212,080,528
#206 3,111,581,989,804,070,186,099,320,645,726,169,127,737,705
#207 5,034,645,418,285,014,325,766,435,419,644,478,339,818,233
#208 8,146,227,408,089,084,511,865,756,065,370,647,467,555,938
#209 13,180,872,826,374,098,837,632,191,485,015,125,807,374,171
#210 21,327,100,234,463,183,349,497,947,550,385,773,274,930,109
#211 34,507,973,060,837,282,187,130,139,035,400,899,082,304,280
#212 55,835,073,295,300,465,536,628,086,585,786,672,357,234,389
#213 90,343,046,356,137,747,723,758,225,621,187,571,439,538,669
#214 146,178,119,651,438,213,260,386,312,206,974,243,796,773,058
#215 236,521,166,007,575,960,984,144,537,828,161,815,236,311,727
#216 382,699,285,659,014,174,244,530,850,035,136,059,033,084,785
#217 619,220,451,666,590,135,228,675,387,863,297,874,269,396,512
#218 1,001,919,737,325,604,309,473,206,237,898,433,933,302,481,297
#219 1,621,140,188,992,194,444,701,881,625,761,731,807,571,877,809
#220 2,623,059,926,317,798,754,175,087,863,660,165,740,874,359,106
#221 4,244,200,115,309,993,198,876,969,489,421,897,548,446,236,915

10-Aug-2011 15:18:30 - Last edited on 10-Aug-2011 15:27:08 by Mugger759

Mugger759

Mugger759

Posts: 5,705 Rune Posts by user Forum Profile RuneMetrics Profile
#222 6,867,260,041,627,791,953,052,057,353,082,063,289,320,596,021
#223 11,111,460,156,937,785,151,929,026,842,503,960,837,766,832,936
#224 17,978,720,198,565,577,104,981,084,195,586,024,127,087,428,957
#225 29,090,180,355,503,362,256,910,111,038,089,984,964,854,261,893
#226 47,068,900,554,068,939,361,891,195,233,676,009,091,941,690,850
#227 76,159,080,909,572,301,618,801,306,271,765,994,056,795,952,743
#228 123,227,981,463,641,240,980,692,501,505,442,003,148,737,643,593
#229 199,387,062,373,213,542,599,493,807,777,207,997,205,533,596,336
#230 322,615,043,836,854,783,580,186,309,282,650,000,354,271,239,929
#231 522,002,106,210,068,326,179,680,117,059,857,997,559,804,836,265
#232 844,617,150,046,923,109,759,866,426,342,507,997,914,076,076,194
#233 1,366,619,256,256,991,435,939,546,543,402,365,995,473,880,912,459
#234 2,211,236,406,303,914,545,699,412,969,744,873,993,387,956,988,653
#235 3,577,855,662,560,905,981,638,959,513,147,239,988,861,837,901,112
#236 5,789,092,068,864,820,527,338,372,482,892,113,982,249,794,889,765
#237 9,366,947,731,425,726,508,977,331,996,039,353,971,111,632,790,877
#238 15,156,039,800,290,547,036,315,704,478,931,467,953,361,427,680,642
#239 24,522,987,531,716,273,545,293,036,474,970,821,924,473,060,471,519
#240 39,679,027,332,006,820,581,608,740,953,902,289,877,834,488,152,161
#241 64,202,014,863,723,094,126,901,777,428,873,111,802,307,548,623,680
#242 103,881,042,195,729,914,708,510,518,382,775,401,680,142,036,775,841
#243 168,083,057,059,453,008,835,412,295,811,648,513,482,449,585,399,521
#244 271,964,099,255,182,923,543,922,814,194,423,915,162,591,622,175,362
#245 440,047,156,314,635,932,379,335,110,006,072,428,645,041,207,574,883
#246 712,011,255,569,818,855,923,257,924,200,496,343,807,632,829,750,245
#247 1,152,058,411,884,454,788,302,593,034,206,568,772,452,674,037,325,128
#248 1,864,069,667,454,273,644,225,850,958,407,065,116,260,306,867,075,373
#249 3,016,128,079,338,728,432,528,443,992,613,633,888,712,980,904,400,501

10-Aug-2011 15:18:49 - Last edited on 10-Aug-2011 15:25:52 by Mugger759

Mugger759

Mugger759

Posts: 5,705 Rune Posts by user Forum Profile RuneMetrics Profile
#250 4,880,197,746,793,002,076,754,294,951,020,699,004,973,287,771,475,874
#251 7,896,325,826,131,730,509,282,738,943,634,332,893,686,268,675,876,375
#252 12,776,523,572,924,732,586,037,033,894,655,031,898,659,556,447,352,249
#253 20,672,849,399,056,463,095,319,772,838,289,364,792,345,825,123,228,624
#254 33,449,372,971,981,195,681,356,806,732,944,396,691,005,381,570,580,873
#255 54,122,222,371,037,658,776,676,579,571,233,761,483,351,206,693,809,497
#256 87,571,595,343,018,854,458,033,386,304,178,158,174,356,588,264,390,370
#257 141,693,817,714,056,513,234,709,965,875,411,919,657,707,794,958,199,867
#258 229,265,413,057,075,367,692,743,352,179,590,077,832,064,383,222,590,237
#259 370,959,230,771,131,880,927,453,318,055,001,997,489,772,178,180,790,104
#260 600,224,643,828,207,248,620,196,670,234,592,075,321,836,561,403,380,341
#261 971,183,874,599,339,129,547,649,988,289,594,072,811,608,739,584,170,445
#262 1,571,408,518,427,546,378,167,846,658,524,186,148,133,445,300,987,550,786
#263 2,542,592,393,026,885,507,715,496,646,813,780,220,945,054,040,571,721,231
#264 4,114,000,911,454,431,885,883,343,305,337,966,369,078,499,341,559,272,017
#265 6,656,593,304,481,317,393,598,839,952,151,746,590,023,553,382,130,993,248
#266 10,770,594,215,935,749,279,482,183,257,489,712,959,102,052,723,690,265,265
#267 17,427,187,520,417,066,673,081,023,209,641,459,549,125,606,105,821,258,513
#268 28,197,781,736,352,815,952,563,206,467,131,172,508,227,658,829,511,523,778
#269 45,624,969,256,769,882,625,644,229,676,772,632,057,353,264,935,332,782,291
#270 73,822,750,993,122,698,578,207,436,143,903,804,565,580,923,764,844,306,069
#271 119,447,720,249,892,581,203,851,665,820,676,436,622,934,188,700,177,088,360
#272 193,270,471,243,015,279,782,059,101,964,580,241,188,515,112,465,021,394,429
#273 312,718,191,492,907,860,985,910,767,785,256,677,811,449,301,165,198,482,789
#274 505,988,662,735,923,140,767,969,869,749,836,918,999,964,413,630,219,877,218

10-Aug-2011 15:31:26 - Last edited on 10-Aug-2011 15:32:53 by Mugger759

Mugger759

Mugger759

Posts: 5,705 Rune Posts by user Forum Profile RuneMetrics Profile
#275 818,706,854,228,831,001,753,880,637,535,093,596,811,413,714,795,418,360,007
#276 1,324,695,516,964,754,142,521,850,507,284,930,515,811,378,128,425,638,237,225
#277 2,143,402,371,193,585,144,275,731,144,820,024,112,622,791,843,221,056,597,232
New Fibonacci numbers (@thread):
#278 3,468,097,888,158,339,286,797,581,652,104,954,628,434,169,971,646,694,834,457
#279 5,611,500,259,351,924,431,073,312,796,924,978,741,056,961,814,867,751,431,689
#280 9,079,598,147,510,263,717,870,894,449,029,933,369,491,131,786,514,446,266,146
#281 14,691,098,406,862,188,148,944,207,245,954,912,110,548,093,601,382,197,697,835
#282 23,770,696,554,372,451,866,815,101,694,984,845,480,039,225,387,896,643,963,981
#283 38,461,794,961,234,640,015,759,308,940,939,757,590,587,318,989,278,841,661,816
#284 62,232,491,515,607,091,882,574,410,635,924,603,070,626,544,377,175,485,625,797
#285 100,694,286,476,841,731,898,333,719,576,864,360,661,213,863,366,454,327,287,613
#286 162,926,777,992,448,823,780,908,130,212,788,963,731,840,407,743,629,812,913,410
#287 263,621,064,469,290,555,679,241,849,789,653,324,393,054,271,110,084,140,201,023
#288 426,547,842,461,739,379,460,149,980,002,442,288,124,894,678,853,713,953,114,433
#289 690,168,906,931,029,935,139,391,829,792,095,612,517,948,949,963,798,093,315,456
#290 1,116,716,749,392,769,314,599,541,809,794,537,900,642,843,628,817,512,046,429,889
#291 1,806,885,656,323,799,249,738,933,639,586,633,513,160,792,578,781,310,139,745,345
#292 2,923,602,405,716,568,564,338,475,449,381,171,413,803,636,207,598,822,186,175,234
#293 4,730,488,062,040,367,814,077,409,088,967,804,926,964,428,786,380,132,325,920,579
#294 7,654,090,467,756,936,378,415,884,538,348,976,340,768,064,993,978,954,512,095,813
#295 12,384,578,529,797,304,192,493,293,627,316,781,267,732,493,780,359,086,838,016,392
#296 20,038,668,997,554,240,570,909,178,165,665,757,608,500,558,774,338,041,350,112,205
#297 32,423,247,527,351,544,763,402,471,792,982,538,876,233,052,554,697,128,188,128,597

10-Aug-2011 15:34:15 - Last edited on 10-Aug-2011 15:34:45 by Mugger759

Mugger759

Mugger759

Posts: 5,705 Rune Posts by user Forum Profile RuneMetrics Profile
#298 52,461,916,524,905,785,334,311,649,958,648,296,484,733,611,329,035,169,538,240,802
#299 84,885,164,052,257,330,097,714,121,751,630,835,360,966,663,883,732,297,726,369,399
#300 137,347,080,577,163,115,432,025,771,710,279,131,845,700,275,212,767,467,264,610,201
#301 222,232,244,629,420,445,529,739,893,461,909,967,206,666,939,096,499,764,990,979,600
#302 359,579,325,206,583,560,961,765,665,172,189,099,052,367,214,309,267,232,255,589,801
#303 581,811,569,836,004,006,491,505,558,634,099,066,259,034,153,405,766,997,246,569,401
#304 941,390,895,042,587,567,453,271,223,806,288,165,311,401,367,715,034,229,502,159,202
The next numbers are too large to fit the box without exceeding the line-end. So, I will stop here:p

10-Aug-2011 15:44:06

Zarfot

Zarfot

Posts: 21,844 Opal Posts by user Forum Profile RuneMetrics Profile
Interesting. If you really wanted to calculate a large fibonacci number efficiently though, there is a recursive formula that can compute a fibonacci number directly from three consecutive fibonacci numbers half the size:
F_n = F_(k+1) * F_(n-k) + F_k * F_(n-k-1)
for any k in the range [0, n).
This is implemented in GMP, so if you have it, this simple program will calculate the Fibonacci number specified as a command line argument:
#include <gmp.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv)
{
unsigned long n = strtoul(argv[1], NULL, 10);
mpz_t fib_n;
mpz_init(fib_n);
mpz_fib_ui(fib_n, n);
mpz_out_str(stdout, 10, fib_n);
}
It took about 2 and a half minutes to calculate the 1 billionth Fibonacci number, which has 208,987,640 digits in base 10.

13-Aug-2011 16:40:27

Mugger759

Mugger759

Posts: 5,705 Rune Posts by user Forum Profile RuneMetrics Profile
Not everyone has access to a compiler. Does your code snippet also show all digits of the number?

__ ¸„.-~-¸
¤¤ ¨ƒ. . . ¡ ––Mugger759
. ¸,--/..,¸¸,.i,¸ 19-20-142-61773047
`°º‹.„¸,„¸¸„.›º`¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

17-Aug-2011 17:00:28

Jumble Caper
Dec Member 2005

Jumble Caper

Posts: 2,979 Adamant Posts by user Forum Profile RuneMetrics Profile
or you could just use the formula... the nth fibonacci number is, if I recall correctly,
(((1+sqrt(5))/2)^n-((1-sqrt(5))/2)^n)/sqrt(5)
EDIT: where sqrt is the square root, and ^ is exponentiation

22-Aug-2011 01:21:43 - Last edited on 22-Aug-2011 01:22:45 by Jumble Caper

Nabu Rimanni

Nabu Rimanni

Posts: 23,865 Opal Posts by user Forum Profile RuneMetrics Profile
I'll regroup the last two numbers by 5's for more space on a line and add them together. I'm doing this by hand so you'll have to check it.
#306
0941 39089 50425 87567 45327 12238 06288 16531 14013 67715 03422 95021 59202
1523 20246 48785 91573 94477 67824 40387 23157 04355 21120 80122 67487 28603
2464 59335 99211 79141 39804 80062 46675 39688 18368 88835 83545 62508 87805

Edit. I had forgotten that I posted on this thread before. Back on page 36 on 11-Jul-2010.

22-Aug-2011 07:15:19 - Last edited on 22-Aug-2011 07:21:30 by Nabu Rimanni

Quick find code: 55-56-974-60029865 Back to Top