I am writing a program in python that is supposed to return the Nth number of a series when we enter the starting number of the series = X and the the Nth number = N. The subsequent number in the series is two time the sum of the digits of the previous number i.e A1 = 2, A2= 4, A3 =8, A4 = 16, A5 = 14, A6=10, A7 = 2 .....
I have already written the code below using operators but it isn't working well as am new to operators.