text: For numbers from 1 to r find arr [ j ] such that gcd ( i , arr [ j ] ) > 1
code: for ( int k = 1 ; k < r + 1 ; k ++ ) { int j = 0 , i = k ; while ( j < arr . Length ) { int x = gcd ( i , arr [ j ] ) ; if ( x > 1 ) {