Formula for perfect squares spectrum. I have been working on exercises from "A first Course in Logic" by S. Hedman.
Exercise 2.3 (d) asks to find a first-order sentence $\varphi$ having the set of perfect squares as a finite spectrum. But I am not sure whether or not my understanding of concepts of model and spectrum is correct.
My solution is:
$\varphi = (\exists x)((x^2 = b) \wedge (\forall y)(y\leq b))$, i.e., there is $x$ such that $x^2 = b$ and for all $y$, $y$ is less than or equal to a constant $b$. Hence, any set of positive integer numbers, with the maximal element that is a perfect square, models this sentence. For example, 
$\{1\}, \{1,2,3,4\}, \{1,\ldots, 9\}$ and so on.    
Could someone confirm my solution (am I on the right track)? Or am I missing something?

You can do this with the signature that has one unary relation $A(x)$ and one binary function $f(x,y)$. The sentence will say, essentially, that $f$ is a bijection between $A \times A$ and $M$. 
It is much more difficult to do this sort of thing with the signature of arithmetic. You would need to include in $\phi$ several axioms about the addition and multiplication operations, the order relation, and how they are related. By comparison, the sentence obtained from the previous paragraph is relatively simple. 
Remember that, for spectrum problems, you can choose any signature that you like. Choosing the right signature can make the problem much simpler. 
