Single state dynamic programming relation for storing gcd of all the elements having index greater than or equal to i in Suffix [ i ]
for i in range ( n - 1 , 0 , - 1 ) : NEW_LINE INDENT Suffix [ i ] = __gcd ( Suffix [ i + 1 ] , a [ i - 1 ] ) ; NEW_LINE DEDENT