Pre - compute smallest divisor of all numbers
SieveOfEratosthenes ( ) ; int [ ] arr = { 10 , 15 , 7 , 25 , 9 , 35 } ; int size = arr . Length ; Console . WriteLine ( largestGCDSubsequence ( arr , size ) ) ; } }