| 1 | initial version |
Not an answer but too long for a comment. Over a finite field like GF(2), you can iterate more quickly by iterating over the general linear group:
F = GF(2)
M = MatrixSpace(F,3)
G = GL(3, F)
L = [] # store the answers here
for X in G:
for Y in G:
for Z in G:
if M(X**3) + Y**3 == 3*Z**3:
L.append([X,Y,Z])
Note the second-to-last line: the group G only has a multiplication defined on it, we can't add elements from it, so we convert one element to the matrix space M, and that forces the addition to happen in M.
Note also that iterating over G should be faster. The cube of the cardinalities of G and M are:
4741632
134217728
| 2 | No.2 Revision |
Not an answer but too long for a comment. Over a finite field like GF(2), you can iterate more quickly by iterating over the general linear group:
F = GF(2)
M = MatrixSpace(F,3)
G = GL(3, F)
L = [] # store the answers here
for X in G:
for Y in G:
for Z in G:
if M(X**3) + Y**3 == 3*Z**3:
3*M(Z**3):
L.append([X,Y,Z])
Note the second-to-last line: the group G only has a multiplication defined on it, we can't add elements from it, so we convert one element to the matrix space M, and that forces the addition to happen in M.. We have to do the same with multiplying by 3.
Note also that iterating over G should be faster. The cube of the cardinalities of G and M are:
4741632
134217728
If you want a single solution, for the first few primes p (except 3) there seems to be a solution with X and Y being the identity matrix, so you could try a single loop for Z in G: and test
if M.identity_matrix() + M.identity_matrix() == 3*M(Z**3):
...
| 3 | No.3 Revision |
Not an answer but too long for a comment. Over a finite field like GF(2), you can iterate more quickly by iterating over the general linear group:
F = GF(2)
M = MatrixSpace(F,3)
G = GL(3, F)
L = [] # store the answers here
for X in G:
for Y in G:
for Z in G:
if M(X**3) + Y**3 == 3*M(Z**3):
L.append([X,Y,Z])
Note the second-to-last line: the group G only has a multiplication defined on it, we can't add elements from it, so we convert one element to the matrix space M, and that forces the addition to happen in M. We have to do the same with multiplying by 3.
Note also that iterating over G should be faster. The cube of the cardinalities of G and M are:
4741632
134217728
If you want a single solution, for the first few odd primes p (except 3) there seems to be a solution with X and Y being the identity matrix, so you could try a single loop for Z in G: and test
if M.identity_matrix() + M.identity_matrix() == 3*M(Z**3):
...
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.