I'm not sure how effective this would be, but I could try something recursive.
For example, 53811
Indicate, for example, the end of the line.
Var2 = 1 Var1 = 1
Check if Var0 Var2 - Var1
1 - 1 not equal to 8 , so this function chain ends.
In the next function chain, Var2 is equal to the last two digits, 11 ; Var1 = 8
Check if Var0 Var2 - Var1
11 - 8 is 3 , so this function chain continues: Var2 = 8 ; Var1 = 3
Check if Var0 Var2 - Var1
8 - 3 equals 5 , and this is also the end of the line, so the function returns True
The basic example, apparently, is that the pointer is at the beginning of the line or viable variables cannot be checked. At each connection point, Var2 and Var1 would be changed respectively to start a new chain; Var0 is derived from the other two.
source share