167 is the 39th prime number, an emirp, an isolated prime, a Chen prime,a Gaussian prime, a safe prime, and an Eisenstein prime with no imaginary part and a real part of the form 3 n − 1 {\displaystyle 3n-1}. 167 is the smallest number which requires six terms when expressed using the greedy algorithm as a sum of squares, 167 = 144 + 16 + 4 + 1 + 1 + 1,[3] although by Lagrange's four-square theorem its non-greedy expression as a sum of squares can be shorter, e.g. 167 = 121 + 36 + 9 + 1.