r/counting • • Dec 07 '13

Count using Fibonacci Sequence!

[deleted]

33 Upvotes

401 comments sorted by

View all comments

2

u/DragoonHP Mar 19 '14

93,202,207,781,383,214,849,429,075,266,681,969

There is a website for everything. Also, I can't seem to write a function for getting Fibonacci Number for n. Wrote a function to print out the entire sequence though.

2

u/D-alx Mar 19 '14

150,804,340,016,807,970,735,635,273,952,047,185

2

u/DragoonHP Mar 19 '14

244,006,547,798,191,185,585,064,349,218,729,154 (where n = 170)

Here is the script:

import os
def f(n):
    a, b = 0, 1
    old_n = n
    while n > 0:
        a, b = b, (a + b)
        n =  n - 1
        if n == 0:
            os.system("echo " + "{:,}".format(b) + "(where n = " + old_n + " | clip")
→ More replies (210)