In this challenge there are 3 question, beginner, intermediate, and others.

Beginner:
1) Find the sum of all Natural numbers that are a multiple of 3 or 11, from 1 to 100,000.

Intermediate:

The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?

Other( a little harder than intermediate):

The Fibonacci sequence is defined by the recurrence relation :
F_n = F_n-1 + F_n-2 where F_1 = 1 and F_2 = 1;

Here are some few terms :
F_1 = 1
F_2 = 1
F_3 = 2
F_4 = 3
F_5 = 5
F_6 = 8
F_7 = 13
...
...
F_12 = 144
As you see, F_7 is the 1st term to contain a fibonacci number with
2 digit. And F_12 is the 1st term to contain a fibonacci number with
3 digits. Find the 1st term in the Fibonacci to contain 1024 digits.

Credits due to project euler. Post solutions here. Make sure you
Comment where relevatent, indent and make code readable. Make
sure its C++ code since this is posted in C++ forumn.

Happe new year.

Edited by firstPerson: n/a

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by firstPerson

Is the last one 4897, and by code can you use c++ libs such as GNU MP to prove it?

You can find that with a quick play around of binet's formula.

\frac{1023+log \sqrt{5}}{log \frac{1+\sqrt{5}}{2}}

Edited by iamthwee: n/a

Yes thats correct. It can be verified by counting each digits of that term's
Fibonacci number :

115608376390706625089549190664369733786445970925010655166
760424614715043180401956023361531012589906666008701135384
680860337142323277348898955730083744453428944898199673173
761829391261593880719920995905364045172805753497005877888
514650261852890912169973122237548612799954472256765867117
867047052072620347857452768890075920944505663947098573306
067443128329755922910416797577152409111707857910556721245
114149359994333561948472285263874014549540972419995272722
099278285877638705250846282985450488999112911941540069976
650201369680356399802384539418446112110316703739228284280
802029274085741456469693423600837071383908955849313042325
078444156346635042914359618760243247795489993354216600326
813193670021764828892436210668356910520591495520508663387
228118180208097190703606124570225389914789857293652171061
704363954657235791896599414491784535604980852900699301359
266468462123848192696191957497850100755231826177948805306
300594889036784573527063810026389395043330147299855494490
6890148704114575048881546982213123677014816963987075777

>> can you use c++ libs such as GNU MP to prove it

Sure you can. Thats what its there for. Although you have shown you
do not need to.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.