For some values of $a, P$ and $t$ it is certainly going to work. The only thing that comes to mind if you want to give that a name is the norm in a quadratic number field. In a quadratic number field $\mathbb{Q}(\sqrt{t})$ for some square free integer $t$, every element is of the form $a + P\sqrt{t}$ with $a, P \in \mathbb{Q}$.
There's something called the norm, which is defined for any element of $\mathbb{Q}(\sqrt{t})$ by
$$\mathrm{\textbf{N}}(a + P\sqrt{t}) = (a + P\sqrt{t})(a - P\sqrt{t}) = a^2 - tP^2$$
Now, you can look at the elements $a + P\sqrt{t}$ with $a, P \in \mathbb{Z}$, and in this case the norm gives you an integer value. Well it turns out that whenever you find an element $a + P\sqrt{t}$ with $\mathrm{\textbf{N}}(a + P\sqrt{t}) = 1$, then this element is what is called a unit and basically what you have there would be $(\mathrm{\textbf{N}}(a + P\sqrt{t}) )^n = 1$.
For example in $\mathbb{Z}(\sqrt{2})$ you have $(-1 + \sqrt{2})(1 + \sqrt{2}) = 1$ and in fact $(-1 + \sqrt{2})^n (1 + \sqrt{2})^n = 1$ for any $n \in \mathbb{Z}$ and this only reflects the fact that $1 + \sqrt{2}$ is a unit in $\mathbb{Z}[\sqrt{2}]$. Maybe you should also take a look at Pell's equation which is certainly related.