All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Fibonacci Tail 2 (Posted on 2023-11-08) Difficulty: 3 of 5
What is the smallest positive integer N, such that the base ten representation of Nth Fibonacci number ends in six zeroes?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 2 of 2 |
clearvars,clc
set=[1 1 2]; n=1;
while set(1)~=0;
  set=[set(2) set(3) mod(set(2)+set(3),1000000)];
  n=n+1;
end
n
f=char(string(fibonacci(sym(n))));
for i=1:length(f)-40
  if 40*i>length(f)
    disp(f(40*i-39:end)) 
  else
    disp(f(40*i-39:40*i)) 
  end
end

finds the 750,000th Fibonacci number, with  156,741 digits.
      
2402716229410201645096092466006718783166
3711242491399455875225642564446715449904
9712132216374249351089481167944075661496
5447418753985018769082434554471136887558
2616141939034330088157690986844830623861


       . . .



4212845780486847231691796660745346409824
9156074871101754360333160707140663811587
2853580334603735159021026539182339027198
6800206858618678091581677244279830687940
7874650195459262826537884989454974328579
6527126182261687456230868950890649393487
3476663145019975519952753065737035467582
3801287923759984886920441523473972056645
713853084177449000000
>> 

  Posted by Charlie on 2023-11-08 09:06:56
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information