I have the following problem:
The structure $A$ has a bearer $\Bbb{N}$ (the set of natural numbers) and it is for a language with only one non-logical symbol $p$, which is a predicate interpreted like : $\langle n,k,m \rangle \in p^A \leftrightarrow n^2 = km + 1$ . Prove that $\{0\}$, $\{ 1 \}$ and $\{ \langle n,n \rangle : n \in \Bbb{N} \}$ are definable.
I know that in order to prove that $\{0\}$ is definable in the structure $A$, I have to show that I can build with $p$ a formula $\phi$ such that $\phi(n)$ is true for $\{0\}, \{1\}, \{\langle n,n \rangle : n \in \Bbb{N}\}$. I wan't to know if this can be considered a valid solution.
For the first I can say: $\phi(m):= \exists n \forall k (n^2 = km + 1)$
For the second: $\phi(n):= \exists k \exists m (n^2= km + 1)$
How about the third one? Do I substitute two variable with n like $\phi(k,m)$ or something like that. I also can't think of an appropriate formula.
Any help is welcomed. Thanks :)