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?
RE: Math Challenge