Given an integer n>2 and an integer a, if there exists an integer d such that n∣ad−1 and n∤ad−1+⋯+1, we say a is n−separating. Given any n>2, let the defect of n be defined as the number of integers a such that 0<a<n, (a,n)=1, and a is not n−separating. Determine all integers n>2 whose defect is equal to the smallest possible value. number theorynumber theory unsolvednumber theory proposed