If x = {n\(^2\)+1:n is a positive integer and 1 \(\leq\) n \(\leq\) 5}, Y…