Originally Posted by

**jamix** If anyone can shed some light on the problem below (even if your unsure of the answer), your help would be much appreciated.

Let $\displaystyle n$ be a positive non-square integer and $\displaystyle p$ a prime number.

Consider the set $\displaystyle S = Z_p + Z_p \cdot \sqrt{n}$

In this set, we define multiplication as follows:

$\displaystyle A \cdot B = (a_1 + b_1\cdot \sqrt{n}) \cdot (a_2 + b_2\cdot \sqrt{n}) =

(a_1 \cdot a_2 + n \cdot b_1 \cdot b_2) Z_p + ((a_1 \cdot b_2 + b_1 \cdot a_2)Z_p) \cdot \sqrt{n}$

The questions I'm interested in are the following:

1) Does this set contain primitive elements regardless of $\displaystyle (p,n)$? That is, does there always exist some element $\displaystyle a$ such that $\displaystyle a^{p^2 - 1} \equiv 1 mod(S)$.

2) If the answer to the above is in the negative, then when is the multiplicative order of S less than $\displaystyle p^2 - 1$? When is it equal to $\displaystyle p^2 - 1$?