Big Fib

Chocoholic
Posts: 44
Joined: Mon Feb 16, 2009 4:11 pm
Location: UK

Post by Chocoholic »

abc: I don't quite get what you want to say.

Anyways, you might want to notice that the text reads "the 1500000th member" of the sequence, not F(1500000). There's a difference, and I calculated 3 different numbers until I got the right one.
quwieorp
Posts: 2
Joined: Tue Apr 07, 2009 4:53 pm

Post by quwieorp »

So how is the Fibonacci sequence defined in this challenge?
Like this?:
Fib(0) = 0
Fib(1) = 1
Fib(2) = 1
Fib(3) = 2
Fib(1 500 000) <--
lukas
Posts: 34
Joined: Wed Nov 26, 2008 1:53 pm
Location: Germany

Post by lukas »

If he is right:
snibril wrote:It starts with 129... and ends with ...000
Then you have to take the "1500001" if you count like that:

"Fib(0) = 0
Fib(1) = 1
Fib(2) = 1
Fib(3) = 2"

I have this number, but still don't get the answer. Something on my every 20.000 function must be wrong :(
tschiew
Posts: 11
Joined: Thu Mar 05, 2009 3:30 pm

Post by tschiew »

So how is the Fibonacci sequence defined in this challenge?
Like this?:
Fib(0) = 0
Fib(1) = 1
Fib(2) = 1
Fib(3) = 2
Fib(1 500 000)
No, the sequence is defined as follows:
Fib(0) = 0
Fib(1) = 1
Fib(2) = 2
...

I also got this problems....
cutter
Posts: 17
Joined: Mon Jan 12, 2009 12:50 pm

Post by cutter »

looks like the sequence of the natural numbers :wink:
wiz1989
Posts: 10
Joined: Thu Feb 19, 2009 7:00 pm
Location: Germany

Post by wiz1989 »

It's

Fib(0) = 1
Fib(1) = 1
Fib(2) = 2
Fib(3) = 3

Just to be correct ;-)
User avatar
teebee
Posts: 89
Joined: Mon Nov 10, 2008 3:21 pm
Location: Germany

Post by teebee »

looks like the sequence of the natural numbers with one exception :wink:
blablaSTX
Posts: 11
Joined: Mon Aug 17, 2009 8:12 pm
Contact:

Post by blablaSTX »

there is no need for it be prime, so please do not discard your result simply because it ends in zeros.

Code: Select all

(1 to:20) collect:[:n | n fib]
gives:
#(1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765)
of which 8, 21, 34, 55 ... are NOT prime.
And, as you can see, "fib 15" also gives you a number which ends in a zero.
quangntenemy
Posts: 8
Joined: Thu Jul 02, 2009 3:41 pm

Post by quangntenemy »

Do you guys calculate it the traditional way? It's kinda slow for me.
blablaSTX
Posts: 11
Joined: Mon Aug 17, 2009 8:12 pm
Contact:

Post by blablaSTX »

... "in the traditional way" ...

Almost; two little tricks help with big numbers, though (both a math trick and a coding trick).
That should not reveal too much info, I hope.
whattheh@ck
Posts: 16
Joined: Wed Jul 16, 2008 2:33 am
Location: here

Post by whattheh@ck »

I was able to do it in about 10 minutes using Python... It's very good at handling large integers. The answer is 16 digits long so the actual number has to be over 320,000 digits long.
hack the planet
User avatar
CodeX
Posts: 350
Joined: Fri Oct 17, 2008 5:28 pm

Post by CodeX »

it took me less than a second to calculate with a high precision calculator and Binet's formula :D
Guderian
Posts: 18
Joined: Tue Jan 25, 2011 4:31 pm
Location: Greece

Post by Guderian »

i solved with the recursive way and c++. I used to huge char arrays of 1 million bytes each to store the results. It took 5 hours to get the result. However the tricky part is the next challenge, must find a way to calculate the ln of this array :P
Millennium
Posts: 17
Joined: Thu Apr 21, 2011 3:08 am

A Word to the Wise

Post by Millennium »

It's not the 1st digit, followed by the 20,000th digit, etc. or the 20,000th followed by the 40,000th, but rather the 1st followed by the 20,001st. That's what originally got me XD
compudemon
Posts: 33
Joined: Sat Aug 13, 2011 2:13 pm

Post by compudemon »

lucky for me i got it on the first try, it does not help that the web does not agree weather it is

1,1,2,3,5
0,1,1,2,3,5

or if the first in the sequence would be 0 or 1

so here is a hint

55 is the 10th number in the fib series given by the same code i solved it with

i used python i would say it was solved in less then 5 mins, i left when it wasn't an instant answer
Post Reply