# 13.12 ATLAS irrationalities

`EB( N )`, `EC( N )`, ldots, `EH( N )`,
`EI( N )`, `ER( N )`,
`EJ( N )`, `EK( N )`, `EL( N )`, `EM( N )`,
`EJ( N, d )`, `EK( N, d )`, `EL( N, d )`, `EM( N, d )`,
`ES( N )`, `ET( N )`, ldots, `EY( N )`,
`ES( N, d )`, `ET( N, d )`, ldots, `EY( N, d )`,
`NK( N, k, d )`

For N a positive integer, let z = 'E(<N>)' = e^{2 pi i / N}. The following so-called atomic irrationalities (see~cite[Chapter 7, Section 10]CCN85) can be entered by functions (Note that the values are not necessary irrational.):

[beginarrayllllll `EB(N)` & = & b_N & = & frac12sum_j=1^N-1z^j^2 & (Nequiv 1bmod 2)

`EC(N)` & = & c_N & = & frac13sum_j=1^N-1z^j^3 & (Nequiv 1bmod 3)

`ED(N)` & = & d_N & = & frac14sum_j=1^N-1z^j^4 & (Nequiv 1bmod 4)

`EE(N)` & = & e_N & = & frac15sum_j=1^N-1z^j^5 & (Nequiv 1bmod 5)

`EF(N)` & = & f_N & = & frac16sum_j=1^N-1z^j^6 & (Nequiv 1bmod 6)

`EG(N)` & = & g_N & = & frac17sum_j=1^N-1z^j^7 & (Nequiv 1bmod 7)

`EH(N)` & = & h_N & = & frac18sum_j=1^N-1z^j^8 & (Nequiv 1bmod 8)

(Note that in c_N, ldots, h_N, N must be a prime.)

[beginarraylllll `ER(N)` & = & sqrtN
`EI(N)` & = & i sqrtN & = & sqrt-N

From a theorem of Gauss we know that [ b_N = left{ beginarrayllll frac12(-1+sqrtN) & rm if & Nequiv 1 & bmod 4
frac12(-1+isqrtN) & rm if & Nequiv -1 & bmod 4 endarrayright. ,]

so sqrt{N} can be (and in fact is) computed from b_N. If N is a negative integer then `ER(N) = EI(-N)`.

For given N, let n_k = n_k(N) be the first integer with multiplicative order exactly k modulo N, chosen in the order of preference [ 1, -1, 2, -2, 3, -3, 4, -4, ldots .]

We have [beginarrayllllll `EY(N)` & = & y_n & = & z+z^n &(n = n_2)
`EX(N)` & = & x_n & = & z+z^n+z^n^2 &(n=n_3)
`EW(N)` & = & w_n & = & z+z^n+z^n^2+z^n^3 &(n=n_4)
`EV(N)` & = & v_n & = & z+z^n+z^n^2+z^n^3+z^n^4 &(n=n_5)
`EU(N)` & = & u_n & = & z+z^n+z^n^2+ldots +z^n^5 &(n=n_6)
`ET(N)` & = & t_n & = & z+z^n+z^n^2+ldots +z^n^6 &(n=n_7)
`ES(N)` & = & s_n & = & z+z^n+z^n^2+ldots +z^n^7 &(n=n_8)

[beginarrayllllll `EM(N)` & = & m_n & = & z-z^n &(n=n_2)
`EL(N)` & = & l_n & = & z-z^n+z^n^2-z^n^3 &(n=n_4)
`EK(N)` & = & k_n & = & z-z^n+ldots -z^n^5 &(n=n_6)
`EJ(N)` & = & j_n & = & z-z^n+ldots -z^n^7 &(n=n_8)

Let n_k^{(d)} = n_k^{(d)}(N) be the d+1-th integer with multiplicative order exactly k modulo N, chosen in the order of preference defined above; we write n_k=n_k^{(0)},n_k^{prime}=n_k^{(1)}, n_k^{primeprime} = n_k^{(2)} and so on. These values can be computed as `NK(N,k,d)` = n_k^{(d)}(N); if there is no integer with the required multiplicative order, `NK` will return `false`.

The algebraic numbers [y_N^prime=y_N^(1),y_N^primeprime=y_N^(2),ldots, x_N^prime,x_N^primeprime,ldots, j_N^prime,j_N^primeprime,ldots] are obtained on replacing n_k in the above definitions by n_k^{prime},n_k^{primeprime},ldots; they can be entered as

[beginarraylll `EY(N,d)` & = & y_N^(d)
`EX(N,d)` & = & x_N^(d)
& vdots
`EJ(N,d)` & = & j_n^(d)

```    gap> EW(16,3); EW(17,2); ER(3); EI(3); EY(5); EB(9);
0
E(17)+E(17)^4+E(17)^13+E(17)^16
-E(12)^7+E(12)^11
E(3)-E(3)^2
E(5)+E(5)^4
1```

GAP 3.4.4
April 1997