Big Fib

rmplpmpl
Posts: 113
Joined: Sun Oct 26, 2008 10:38 am
Location: Germany

Big Fib

Post by rmplpmpl »

Ok, another problem I have - I want to believe I got the correct number and the answer but it is not accepted.

Anyway, could please someone tell me if the number I have is correct, starting with 11742003035506558... and ending with ...32895630172796932853738956168354898000000

the six zeros at the end tell me that I might have a glitch in my computation...
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Re: Big Fib

Post by MerickOWA »

rmplpmpl wrote:Ok, another problem I have - I want to believe I got the correct number and the answer but it is not accepted.

Anyway, could please someone tell me if the number I have is correct, starting with 11742003035506558... and ending with ...32895630172796932853738956168354898000000

the six zeros at the end tell me that I might have a glitch in my computation...
Can't be a prime and end in zeros ;) It would trivially be divisible by 2 or 5 ;)
the_impaler
Posts: 61
Joined: Wed Apr 30, 2008 3:31 am

Re: Big Fib

Post by the_impaler »

[quote="MerickOWA"]

Can't be a prime and end in zeros ;) It would trivially be divisible by 2 or 5 ;)[/quote]
How do you know that it "can't be a prime" ? 13 is prime and so is 233 and there are more.
Of course you know because you have found it but off the bat it's hard to say.
That would probably give adum another crazy number crunching idea like "find the prime fib that has last 100 digits matching pi in reverse"
sigi
Posts: 37
Joined: Sun Oct 26, 2008 4:58 pm

Post by sigi »

I have no idea what Merick is talking about... anyway: you're supposed to give every 20,000th digit of the 1.5 millionth Fibonacci number -- and your answer is having a string of zeroes at the end. I would like to say that it's extremely unlikely that you answer is correct.

I'm not a number theorist but I'm guessing that the answer to this challenge pretty much amounts to a random number -- meaning that every digit is roughly equally likely.

There's not that much that can go wrong with this challenge (or the coding involved). Just re-check your code.
rmplpmpl
Posts: 113
Joined: Sun Oct 26, 2008 10:38 am
Location: Germany

Post by rmplpmpl »

sigi wrote:I have no idea what Merick is talking about... anyway: you're supposed to give every 20,000th digit of the 1.5 millionth Fibonacci number -- and your answer is having a string of zeroes at the end. I would like to say that it's extremely unlikely that you answer is correct.

I'm not a number theorist but I'm guessing that the answer to this challenge pretty much amounts to a random number -- meaning that every digit is roughly equally likely.

There's not that much that can go wrong with this challenge (or the coding involved). Just re-check your code.
Yupp, I know that 20,000th digit part and I could extract THAT part easily, but since I obviously got the wrong number, the resulting digits were wrong, too. Bah, back to computation.


Thumbs up to these challenges who make me learning stuff!
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

I just recalculated it - I get the same ending as you, but a different beginning. Maybe you calculated the 1499999th instead. :)
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Re: Big Fib

Post by MerickOWA »

the_impaler wrote:How do you know that it "can't be a prime" ? 13 is prime and so is 233 and there are more.
Of course you know because you have found it but off the bat it's hard to say.
That would probably give adum another crazy number crunching idea like "find the prime fib that has last 100 digits matching pi in reverse"
It can't be prime if the last digit is a zero. Any number that ends in zero is divisible by 10, and thus NOT prime.

Same way I can trivially prove that every prime (except 2 and 5) must end with either 1, 3, 7 or 9. If it ended in 0,2,4,6,8 it would be even and thus divisible by 2. If it ends in 0 or 5 its divisible by 5.
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

Ok ignore me, I was thinking of a different problem were you have to calculate a big prime number ;) fibonacci numbers are different sorry ;)
eike42
Posts: 15
Joined: Sun Oct 26, 2008 1:17 pm

Post by eike42 »

I have the same value... either its correct, or we're using the same codebase:

Used this one: http://www.bigzaphod.org/fibonacci/

My own perl script was too damn slow and I was to lazy to write C code ;)
rmplpmpl
Posts: 113
Joined: Sun Oct 26, 2008 10:38 am
Location: Germany

Post by rmplpmpl »

eike42 wrote:I have the same value... either its correct, or we're using the same codebase:

Used this one: http://www.bigzaphod.org/fibonacci/

My own perl script was too damn slow and I was to lazy to write C code ;)
hm, I used another tool (Formula One IDE) for computation of the number and a generic tool to extract the digits asked for. Length of "my" number is 67170, so the solution had four digits.
snibril
Posts: 31
Joined: Sun Oct 26, 2008 11:18 pm

Post by snibril »

fib(1500000) can be computed in under 5min on a Phenom 9850 with bc under linux and has more than 300000 digits.
hoki
Posts: 5
Joined: Tue Oct 28, 2008 5:22 pm

Post by hoki »

I'm kinda stuck here. First I computed what I thought was the right number using bc. Then I noticed it asked for the 1,500,000th member of the Fibonacci sequence instead of fib(1.5m), so I recalculated. Still my solutions don't seem to be correct.

My number starts with "19768781" and ends with "345698". It has 313481 digits.

Did I get it right that you want the first digit, then take a 20,000-step, that digit (20001th) and so on? Or do you want the first and the k*20,0000th digits, with k = 1,2,...

Bye,
hoki
snibril
Posts: 31
Joined: Sun Oct 26, 2008 11:18 pm

Post by snibril »

It starts with 129... and ends with ...000
brazzy
Posts: 14
Joined: Fri Nov 07, 2008 2:30 am
Location: Munich, Germany
Contact:

Post by brazzy »

I think one reason why many people are having problems is that some definitions of the Fibonacci sequence have it start with 0 and 1, and others start with 1 and 1, so that the numbering is one off between those two definitions.
abc
Posts: 12
Joined: Sun Nov 02, 2008 8:40 pm

Fib 1 = 1

Post by abc »

Hi!
I think everybody should know that the first fib=1 in this challenge. (not 0)
Still got the same problems...

abc
Post Reply