def generate_chain(start, n):
    node = Node(start)
for k in range(n):
    yield node.get_data()
node.set_next(node.get_data() + sum(int(i) for i in str(node)))
node.set_data(node.get_next())
value = node.get_data()
I = generate_chain(409, 5)
for i in I:
    pass
Each value in the node of a chain is calculated from the previous value plus the sum of the digits of the previous value