Single state dynamic programming relation for storing gcd of all the elements having index greater than or equal to i in Suffix [ i ]
for ( int i = n - 1 ; i >= 1 ; i -= 1 ) { Suffix [ i ] = __gcd ( Suffix [ i + 1 ] , a [ i - 1 ] ) ; }