A

**peaceful** and

**pleasant** night for you,

If Mp is a Mersenne number with exponent p

I can predict the following rotation matrix

M=(Mp-2^[(p-1)/2];-2^[(p-1)/2)

(2^[(p-1)/2]; Mp-2^[(p-1)/2])

with det (M)=1

**Example**: Mp=31 p=5

M=(27, -4)

(4, 27)

with det (M)=16+16=1 mod 31.

This rotation matrix is not a result of two vectors (x1,y1), (x2, y2) with the same norm x1²+y²=x2²+y2²=n mod Mp,

which needed to be found in advance,

but it is completely predictive.

I did not understand, why this matrix occurs one time for non quadratic residues and one time for quadratic residues:

(27,4)* (2)=(4)

(-4,27) (3)=(11)

with 22+32 = 13 and jac (13, 31)=-1

(27,4)* (5)=(8)

(-4,27) (7)=(14)

52+72 = 12 and jac (12, 31)=-1

(27,27)* (8)=(1)

(-27,27) (15)=(3)

82+152 = 10 and jac (10, 31)=1

Is there a mathematical explication for this phenomenon ?

More examples and as usual a web interface under

http://devalco.de/unit_circle/system_tangens.php
Enjoy the predictable rotation matrix,