Suppose that n is a positive integer with the properties: for any integers a and b, n is not prime and n = a² + b², where a is the pth prime (i.e., a = pth prime). What is the smallest possible value of n?