# Development ofAlgorithmic Constructions

 20:39:56 26.Jan 2022

29 31 33

 Number p=

### Calculation

a^2+(bI)^2 = a^2-b^2 = 1 mod p

Distance to the middle point
ph=(prim-1)/2;
if (i < ph) m_i=i;
else m_i=prim-i;

if (j < ph) m_j=j;
else m_j=prim-j;

dist=(m_i^2+m_j^2) % prim;

Potence 2 Potence 3 Potence 5 Potence 7 Potence 11 Potence 13 Potence 17 Potence 19 Potence 23 Potence 29
Square 7

### Number = 31, Exponent = 7, 31 = 3 mod 4, 31 = 7 mod 8

 30 0 30 I
Number of elements = 30

### Number = 31, Exponent = 7, 31 = 3 mod 4, 31 = 7 mod 8

Potence 2 Potence 3 Potence 5 Potence 7 Potence 11 Potence 13 Potence 17 Potence 19 Potence 23 Potence 29
Square 7

### href=7. root

 30^2-0^2=130*0=0dist=1 30^2-3^2=2330/3=1030*3=28dist=6 30^2-28^2=2330/28=2130*28=3dist=6 25^2-11^2=825/11=2225*11=27dist=9 25^2-20^2=825/20=925*20=4dist=9 24^2-5^2=2424/5=1124*5=27dist=2 24^2-12^2=2924/12=224*12=9dist=11 24^2-19^2=2924/19=2924*19=22dist=11 24^2-26^2=2424/26=2024*26=4dist=2 23^2-2^2=2923/2=2723*2=15dist=14 23^2-29^2=2923/29=423*29=16dist=14 20^2-12^2=820/12=1220*12=23dist=7 20^2-19^2=820/19=1920*19=8dist=7 18^2-3^2=518/3=618*3=23dist=10 18^2-28^2=518/28=2518*28=8dist=10 13^2-3^2=513/3=2513*3=8dist=10 13^2-28^2=513/28=613*28=23dist=10 11^2-12^2=811/12=1911*12=8dist=7 11^2-19^2=811/19=1211*19=23dist=7 8^2-2^2=298/2=48*2=16dist=14 8^2-29^2=298/29=278*29=15dist=14 7^2-5^2=247/5=207*5=4dist=2 7^2-12^2=297/12=297*12=22dist=11 7^2-19^2=297/19=27*19=9dist=11 7^2-26^2=247/26=117*26=27dist=2 6^2-11^2=86/11=96*11=4dist=9 6^2-20^2=86/20=226*20=27dist=9 1^2-0^2=11*0=0dist=1 1^2-3^2=231/3=211*3=3dist=6 1^2-28^2=231/28=101*28=28dist=6