RE: Math Challenge

You are viewing a single comment's thread from:

Math Challenge

in math •  7 years ago 

I wrote a little python script to do it for me:

l = (0,1,2,3,4,5)
hist = []
def getNext(l):
        return (l[1],l[2],l[3],l[4],l[5],int(str(sum(l))[-1]))

for i in range(100000):
        hist.append(l)
        l = getNext(l)
        print(l)
        if l in hist:
                print("DUPLICATE at {}".format(i))
                break
        if l == (1,3,5,7,9):
                print("FOUND IT")

After 1456 iterations of this loop, we come back to the original 6 terms of the sequence and we still haven't encountered 13579.

I have no good mathematical answer for why this is true though...which I assume there is?

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Actually I'm still trying to solve this myself. I really like the code. There could be a sequence of 2x+1 starting with x=0 and going to x=4 that is past 1456 iterations. The way to prove it would be to find a recurring cycle and show that this cannot be part of the cycle. What I'm trying to do right now is see if it has any pattern to it.

That's what I'm saying I did...the code finds a cycle at the 1456th iteration