Skip to main content
tag edit + data update: checking upto 3000000
Source Link
Sebastien Palcoux
  • 27k
  • 5
  • 74
  • 186

The investigation below shows that $F_3$ contains every non-negative integer less than $2 \cdot 10^6$$3 \cdot 10^6$.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<2 \cdot 10^6$$2543<n<3 \cdot 10^6$. Then every non-negative integer less than $2 \cdot 10^6$$3 \cdot 10^6$ is covered.

sage: ModelOutEE(1,20000003000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]

The investigation below shows that $F_3$ contains every non-negative integer less than $2 \cdot 10^6$.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<2 \cdot 10^6$. Then every non-negative integer less than $2 \cdot 10^6$ is covered.

sage: ModelOutEE(1,2000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]

The investigation below shows that $F_3$ contains every non-negative integer less than $3 \cdot 10^6$.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<3 \cdot 10^6$. Then every non-negative integer less than $3 \cdot 10^6$ is covered.

sage: ModelOutEE(1,3000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]
data update: checking upto 2000000
Source Link
Sebastien Palcoux
  • 27k
  • 5
  • 74
  • 186

The investigation below shows that $F_3$ contains every non-negative integer less than $10^6$$2 \cdot 10^6$.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<10^6$$2543<n<2 \cdot 10^6$. It follows thatThen every non-negative integer less than $10^6$$2 \cdot 10^6$ is covered.

sage: ModelOutEE(1,10000002000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]

The investigation below shows that $F_3$ contains every non-negative integer less than $10^6$.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<10^6$. It follows that every non-negative integer less than $10^6$ is covered.

sage: ModelOutEE(1,1000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]

The investigation below shows that $F_3$ contains every non-negative integer less than $2 \cdot 10^6$.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<2 \cdot 10^6$. Then every non-negative integer less than $2 \cdot 10^6$ is covered.

sage: ModelOutEE(1,2000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]
post polishing + proof simplification of EE \subset F + computation data for small values added.
Source Link
Sebastien Palcoux
  • 27k
  • 5
  • 74
  • 186

ConsiderLet $\mathbb{N}$ be the following two setsset of non-negative integers. Let (we assume$E_n$ be the set of integers which are the sum of $0 \in \mathbb{N}$):
$$E_n= \left\{ \sum_{i=1}^na_i^2 \ | \ a_i \in \mathbb{N} \right\} \ \text{ and } \ F_n=\left\{ \Vert A \Vert^2 \ | \ A \in M_n(\mathbb{N}) \right\},$$$n$ squares. Let $F_n$ be the set of integers of the form $\Vert A \Vert^2$ with $A \in M_n(\mathbb{N})$ and $\Vert A \Vert$ the operator norm. Recall that $\Vert A \Vert^2$ is the largest eigenvalue of $A^*A$.

If $A = (u,0,\cdots, 0)$$A = uv^*$ with $u,v \in \mathbb{N}^n$ then $\Vert A \Vert^2 = \Vert u \Vert^2$. It follows$A^*A = v u^*uv^*$, so that $\Vert A \Vert^2 = \Vert u \Vert^2\Vert v \Vert^2$ and $E_n \subseteq F_n$$E_nE_n \subseteq F_n$.

The caseThis answer and $n=3$ is exceptional in the senseLagrange's four square theorem imply that $E_n= F_n$$E_n = F_n$ $\forall n \neq 3$, whereas $E_3 \subsetneq F_3$: because, by Legendre's three-square theorem, $E_3 = \mathbb{N} \setminus \{ 4^a(8b+7) \ | \ a,b \in \mathbb{N} \} \subsetneq E_3E_3$.

  • obviously $E_1=F_1$,
  • it is proved here that $E_2=F_2$,
  • for $n \ge 4$, $E_n=F_n$ because $E_4 = \mathbb{N}$, by Lagrange's four square theorem,
  • finally, $E_3 \subsetneq F_3$ because $E_3E_3 \subseteq F_3$ (see investigation below) and

Legendre's three-square theorem: $E_3 = \mathbb{N} \setminus \{ 4^a(8b+7) \ | \ a,b \in \mathbb{N} \}$.

The computationinvestigation below shows that $F_3$ contains every natural numbernon-negative integer less than $10^6$; leading to:.

Question: Does the form $\Vert A \Vert^2$ cover every natural number for $A \in M_3(\mathbb{N})$?

Question: Does the form $\Vert A \Vert^2$ cover every non-negative integer for $A \in M_3(\mathbb{N})$?


 

NoteObserve that $\Vert A \Vert^2$$L:= \mathbb{N} \setminus E_3E_3$ is the largest eigenvalueset of positive integers $A^*A$$8a-1$ whose prime factors are of the form $8b \pm 1$. Assume thatThe first elements of $L$ are $7, 23, 31, 47, 71, 79, 103, 119, 127, 151, 167, \dots$

Take $A=(u_1,u_2,u_3)$ with $u_i \in \mathbb{N}^3$. Then, observe that the characteristic polynomial of $A^*A$ is $$P(x) = x^3-\left(\sum_{i=1}^3 \Vert u_i \Vert^2 \right)x^2 + \left( \sum_{i<j} \Vert u_i \times u_j \Vert^2 \right)x - \left( u_1 \cdot (u_2 \times u_3) \right)^2 $$ with $u \times v$ the cross product and $u \cdot v$ the dot product.

$$\Vert A \Vert^2 = \frac{1}{2} \left( \sum_{i=1}^3 \Vert u_i \Vert^2 + \sqrt{\left( \sum_{i=1}^3 \Vert u_i \Vert^2 \right)^2 -4 \sum_{i<j} \Vert u_i \times u_j \Vert^2} \right)$$

$$\Vert A \Vert^2 = \frac{1}{2} \left( \sum_{i=1}^3 \Vert u_i \Vert^2 + \sqrt{\left( \sum_{i=1}^3 \Vert u_i \Vert^2 \right)^2 -4 \sum_{i<j} \Vert u_i \times u_j \Vert^2} \right)$$

Assume moreover that $u_1, u_2, u_3$ are collinear$u_3=0$, i.e. there is $u \in \mathbb{N}^3$ and $k_i \in \mathbb{N}$ such that $u_i = k_iu$. Then $$\Vert A \Vert^2 = \Vert u \Vert^2 \sum_{i=1}^3 k_i^2$$ It follows that $F_3$ contains the set $E_3E_3$. Observe that $E_3E_3 = \mathbb{N} \setminus I $ with $I$ the set of natural numbers $n$ of the form $8a-1$ whose prime factors are of the form $8b \pm 1$. The first elements of $I$ are $7, 23, 31, 47, 71, 79, 103, 119, 127, 151, 167, 191, 199, \dots$

Now assume justthen observe that $u_3=0$. Then \begin{align*} \Vert A \Vert^2&=\frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 \right)^2 -4 \Vert u_1 \times u_2 \Vert^2} \right)\\ &=\frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 - \Vert u_2 \Vert^2 \right)^2 + 4 (u_1 \cdot u_2)^2} \right) \end{align*}$$\Vert A \Vert^2 = \frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 - \Vert u_2 \Vert^2 \right)^2 + 4 (u_1 \cdot u_2)^2} \right).$$ If moreover, $\Vert u_1 \Vert = \Vert u_2 \Vert$ then $\Vert A \Vert^2 = \Vert u_1 \Vert^2 + (u_1 \cdot u_2) = \frac{1}{2} \Vert u_1+u_2 \Vert^2 $, and we know by this post that this form covers every odd less than $90000$, except those in $\{ 5, 23, 29, 65, 167 \}$.
So the above models together, but its intersection with the following equalities covers every $n<90000$.$L$ is just $\{23,167\}$ whereas
$$ 23 = \left\| \pmatrix{0&2&0\\ 1&4&0 \\ 2&1&0} \right\|^2 \ \text{ and } \ 167 = \left\| \pmatrix{0&7&0\\ 2&5&0 \\ 8&7&0} \right\|^2.$$ IfIt follows that every non-negative integer less than $90000$ is covered.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment of Hagen von Eitzen) that we are reduced to show that $\forall n \in I$ with $n \ge 90000$$\forall n > 90000$, if $n \in L$ then $2n$ is a sum of three squaresthe form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the additionalstronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $), which. It is checked below for $2543<n<10^6$. It follows that every non-negative integer less than $10^6$ is covered.

Remark: This stronger version of Legendre's three-square theorem is suspected to be true for every $2n$ with $n$ odd greater than $5969$ (see this post), and in general, every sufficiently largelarge element of $E_3$.

ComputationComputation

sage: ModelOutEE(25441,1000000)
[][23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]
cpdef legendre_interStrongLegendre(int i):
    cdef int n,a,b,c,j
    n=isqrt(i)
    for a in range(n+1):
        for b in range(a+1):
            j=i-a**2-b**2
            if j>=0:
                c=isqrt(j)
                if c**2==j:
                    if c<=a and a<=b+c:
                        return True
                    if c>a and c<=a+b:
                        return True
    return False

cpdef is_EE(int i):
    cdef int a,l
    cdef list f
    cdef tuple j
    if not Integer(i).mod(8)==7:
        return True
    b=0
    f=list(factor(i))
    for j in f:  
        a=j[0]
        if not Integer(a).mod(8) in [1,7]:
            return True
    return False

cpdef ModelOutEE(int r1, int r2):
    cdef int i
    cdef list L
    L=[]
    for i in range(r1,r2):
        if not is_EE(i):
            if not legendre_interStrongLegendre(2*i):
                L.append(i)
    return L

Consider the following two sets (we assume $0 \in \mathbb{N}$):
$$E_n= \left\{ \sum_{i=1}^na_i^2 \ | \ a_i \in \mathbb{N} \right\} \ \text{ and } \ F_n=\left\{ \Vert A \Vert^2 \ | \ A \in M_n(\mathbb{N}) \right\},$$ with $\Vert A \Vert$ the operator norm. If $A = (u,0,\cdots, 0)$ then $\Vert A \Vert^2 = \Vert u \Vert^2$. It follows that $E_n \subseteq F_n$.

The case $n=3$ is exceptional in the sense that $E_n= F_n$ $\forall n \neq 3$ whereas $E_3 \subsetneq F_3$:

  • obviously $E_1=F_1$,
  • it is proved here that $E_2=F_2$,
  • for $n \ge 4$, $E_n=F_n$ because $E_4 = \mathbb{N}$, by Lagrange's four square theorem,
  • finally, $E_3 \subsetneq F_3$ because $E_3E_3 \subseteq F_3$ (see investigation below) and

Legendre's three-square theorem: $E_3 = \mathbb{N} \setminus \{ 4^a(8b+7) \ | \ a,b \in \mathbb{N} \}$.

The computation below shows that $F_3$ contains every natural number less than $10^6$; leading to:

Question: Does the form $\Vert A \Vert^2$ cover every natural number for $A \in M_3(\mathbb{N})$?


 

Note that $\Vert A \Vert^2$ is the largest eigenvalue of $A^*A$. Assume that $A=(u_1,u_2,u_3)$ with $u_i \in \mathbb{N}^3$. Then, observe that the characteristic polynomial of $A^*A$ is $$P(x) = x^3-\left(\sum_{i=1}^3 \Vert u_i \Vert^2 \right)x^2 + \left( \sum_{i<j} \Vert u_i \times u_j \Vert^2 \right)x - \left( u_1 \cdot (u_2 \times u_3) \right)^2 $$ with $u \times v$ the cross product and $u \cdot v$ the dot product.

$$\Vert A \Vert^2 = \frac{1}{2} \left( \sum_{i=1}^3 \Vert u_i \Vert^2 + \sqrt{\left( \sum_{i=1}^3 \Vert u_i \Vert^2 \right)^2 -4 \sum_{i<j} \Vert u_i \times u_j \Vert^2} \right)$$

Assume that $u_1, u_2, u_3$ are collinear, i.e. there is $u \in \mathbb{N}^3$ and $k_i \in \mathbb{N}$ such that $u_i = k_iu$. Then $$\Vert A \Vert^2 = \Vert u \Vert^2 \sum_{i=1}^3 k_i^2$$ It follows that $F_3$ contains the set $E_3E_3$. Observe that $E_3E_3 = \mathbb{N} \setminus I $ with $I$ the set of natural numbers $n$ of the form $8a-1$ whose prime factors are of the form $8b \pm 1$. The first elements of $I$ are $7, 23, 31, 47, 71, 79, 103, 119, 127, 151, 167, 191, 199, \dots$

Now assume just that $u_3=0$. Then \begin{align*} \Vert A \Vert^2&=\frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 \right)^2 -4 \Vert u_1 \times u_2 \Vert^2} \right)\\ &=\frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 - \Vert u_2 \Vert^2 \right)^2 + 4 (u_1 \cdot u_2)^2} \right) \end{align*} If moreover, $\Vert u_1 \Vert = \Vert u_2 \Vert$ then $\Vert A \Vert^2 = \Vert u_1 \Vert^2 + (u_1 \cdot u_2) = \frac{1}{2} \Vert u_1+u_2 \Vert^2 $, and we know by this post that this form covers every odd less than $90000$, except those in $\{ 5, 23, 29, 65, 167 \}$.
So the above models together with the following equalities covers every $n<90000$. $$ 23 = \left\| \pmatrix{0&2&0\\ 1&4&0 \\ 2&1&0} \right\|^2 \ \text{ and } \ 167 = \left\| \pmatrix{0&7&0\\ 2&5&0 \\ 8&7&0} \right\|^2.$$ If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment of Hagen von Eitzen) that we are reduced to show that $\forall n \in I$ with $n \ge 90000$, $2n$ is a sum of three squares $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the additional assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $), which is checked below for $2543<n<10^6$.

Remark: This stronger version of Legendre's three-square theorem is suspected to be true for every $2n$ with $n$ odd greater than $5969$ (see this post), and in general, every sufficiently large element of $E_3$.

Computation

sage: ModelOutEE(2544,1000000)
[]
cpdef legendre_inter(int i):
    cdef int n,a,b,c,j
    n=isqrt(i)
    for a in range(n+1):
        for b in range(a+1):
            j=i-a**2-b**2
            if j>=0:
                c=isqrt(j)
                if c**2==j:
                    if c<=a and a<=b+c:
                        return True
                    if c>a and c<=a+b:
                        return True
    return False

cpdef is_EE(int i):
    cdef int a,l
    cdef list f
    cdef tuple j
    if not Integer(i).mod(8)==7:
        return True
    b=0
    f=list(factor(i))
    for j in f:  
        a=j[0]
        if not Integer(a).mod(8) in [1,7]:
            return True
    return False

cpdef ModelOutEE(int r1, int r2):
    cdef int i
    cdef list L
    L=[]
    for i in range(r1,r2):
        if not is_EE(i):
            if not legendre_inter(2*i):
                L.append(i)
    return L

Let $\mathbb{N}$ be the set of non-negative integers. Let $E_n$ be the set of integers which are the sum of $n$ squares. Let $F_n$ be the set of integers of the form $\Vert A \Vert^2$ with $A \in M_n(\mathbb{N})$ and $\Vert A \Vert$ the operator norm. Recall that $\Vert A \Vert^2$ is the largest eigenvalue of $A^*A$.

If $A = uv^*$ with $u,v \in \mathbb{N}^n$ then $A^*A = v u^*uv^*$, so that $\Vert A \Vert^2 = \Vert u \Vert^2\Vert v \Vert^2$ and $E_nE_n \subseteq F_n$.

This answer and Lagrange's four square theorem imply that $E_n = F_n$ $\forall n \neq 3$, whereas $E_3 \subsetneq F_3$ because, by Legendre's three-square theorem, $E_3 = \mathbb{N} \setminus \{ 4^a(8b+7) \ | \ a,b \in \mathbb{N} \} \subsetneq E_3E_3$.

The investigation below shows that $F_3$ contains every non-negative integer less than $10^6$.

Question: Does the form $\Vert A \Vert^2$ cover every non-negative integer for $A \in M_3(\mathbb{N})$?

Observe that $L:= \mathbb{N} \setminus E_3E_3$ is the set of positive integers $8a-1$ whose prime factors are of the form $8b \pm 1$. The first elements of $L$ are $7, 23, 31, 47, 71, 79, 103, 119, 127, 151, 167, \dots$

Take $A=(u_1,u_2,u_3)$ with $u_i \in \mathbb{N}^3$. Then the characteristic polynomial of $A^*A$ is $$P(x) = x^3-\left(\sum_{i=1}^3 \Vert u_i \Vert^2 \right)x^2 + \left( \sum_{i<j} \Vert u_i \times u_j \Vert^2 \right)x - \left( u_1 \cdot (u_2 \times u_3) \right)^2 $$ with $u \times v$ the cross product and $u \cdot v$ the dot product.

$$\Vert A \Vert^2 = \frac{1}{2} \left( \sum_{i=1}^3 \Vert u_i \Vert^2 + \sqrt{\left( \sum_{i=1}^3 \Vert u_i \Vert^2 \right)^2 -4 \sum_{i<j} \Vert u_i \times u_j \Vert^2} \right)$$

Assume moreover that $u_3=0$, and then observe that $$\Vert A \Vert^2 = \frac{1}{2} \left( \Vert u_1 \Vert^2 + \Vert u_2 \Vert^2 + \sqrt{\left( \Vert u_1 \Vert^2 - \Vert u_2 \Vert^2 \right)^2 + 4 (u_1 \cdot u_2)^2} \right).$$ If moreover $\Vert u_1 \Vert = \Vert u_2 \Vert$ then $\Vert A \Vert^2 = \Vert u_1 \Vert^2 + (u_1 \cdot u_2) = \frac{1}{2} \Vert u_1+u_2 \Vert^2 $, and we know by this post that this form covers every odd less than $90000$, except those in $\{ 5, 23, 29, 65, 167 \}$, but its intersection with $L$ is just $\{23,167\}$ whereas
$$ 23 = \left\| \pmatrix{0&2&0\\ 1&4&0 \\ 2&1&0} \right\|^2 \ \text{ and } \ 167 = \left\| \pmatrix{0&7&0\\ 2&5&0 \\ 8&7&0} \right\|^2.$$ It follows that every non-negative integer less than $90000$ is covered.

If $u_1=(a,b,c)$, $u_2 = (b,c,a)$ and $u_3=0$, then $2\Vert A \Vert^2 = (a+b)^2+(b+c)^2+(c+a)^2$.
Observe (after this comment) that we are reduced to show that $\forall n > 90000$, if $n \in L$ then $2n$ is of the form $x^2+y^2+z^2$ (which is true by Legendre's three-square theorem) with the stronger assumption that $x,y,z$ are the integer sides of a triangle (i.e. $x \le y \le z \le x+y $). It is checked below for $2543<n<10^6$. It follows that every non-negative integer less than $10^6$ is covered.

Remark: This stronger version of Legendre's three-square theorem is suspected to be true for every $2n$ with $n$ odd greater than $5969$ (see this post), and in general every large element of $E_3$.

Computation

sage: ModelOutEE(1,1000000)
[23, 167, 239, 479, 623, 1031, 1439, 1751, 2543]
cpdef StrongLegendre(int i):
    cdef int n,a,b,c,j
    n=isqrt(i)
    for a in range(n+1):
        for b in range(a+1):
            j=i-a**2-b**2
            if j>=0:
                c=isqrt(j)
                if c**2==j:
                    if c<=a and a<=b+c:
                        return True
                    if c>a and c<=a+b:
                        return True
    return False

cpdef is_EE(int i):
    cdef int a,l
    cdef list f
    cdef tuple j
    if not Integer(i).mod(8)==7:
        return True
    b=0
    f=list(factor(i))
    for j in f:  
        a=j[0]
        if not Integer(a).mod(8) in [1,7]:
            return True
    return False

cpdef ModelOutEE(int r1, int r2):
    cdef int i
    cdef list L
    L=[]
    for i in range(r1,r2):
        if not is_EE(i):
            if not StrongLegendre(2*i):
                L.append(i)
    return L
clarification: 0 \in \mathbb{N}
Source Link
Sebastien Palcoux
  • 27k
  • 5
  • 74
  • 186
Loading
Source Link
Sebastien Palcoux
  • 27k
  • 5
  • 74
  • 186
Loading