wrote iterative method

recursion depth gets hit and/or segfaults on large numbers.
ring buffer in python

makes no sense.
stubs