Add function to generate random PC terms