Erdős-Straus-conjecture and residue classes modulo 840 (Python)
(This question is the 'sequel' to my first question, that you can find here: Erdős-Straus-conjecture using polynomials in Python).
With the help of contributor Yong Hao Ng, I managed to write a Sage function to calculate the value of an integer $m$ such that the coefficients in $frac4k = frac1{x(k)} + frac1{y(k)} + frac1{z(k)}$ (1) would be integers too. One thing I noticed was that $x(k),y(k)$ and $z(k)$ represent integers when $k equiv b$ (mod $m$) $iff k = am + b$ ($a,b,m in mathbb{Z}$) (Am I correct?). This means that (1) can be rewritten as follows: $frac4{am+b} = frac1{x(am+b)} + frac1{y(am+b)} + frac1{z(am+b)} = frac1{x'(a)} + frac1{y'(a)} = frac1{z'(a)}$, with $x'(a),y'(a)$ and $z'(a)$ polynomials in $a$ that are automatically integers for all $a in mathbb{Z}$.
I have done this substitution for the four polynomials that I mentioned in my previous question.
m = mP(u,v,P1)[0]
show(p1(k=a*m+b))
m = mP(u,v,P2)[0]
show(p2(k=a*m+b))
m = mP(u,v,P3)[0]
show(p3(k=a*m+b))
m = mP(u,v,P4)[0]
show(p4(k=a*m+b))
I have checked the output and I seems correct. (For example for (P1) I get back: $frac1{(160a+b)u} + frac1{(160a+b)v} + frac{4uv-u-v}{(160a+b)uv}$).
So, now to the question. As you can see, this method (of substitution) is very useful for a lot of residue classes (especially for all residue classes up to modulo 840, except for six of them!). I've done my research and found that the six remaining open residue classes should be $1^2, 11^2, 13^2, 17^2, 19^2$ and $23^2$ mod($m$). Alas, I can't find a way to write a useful Sage (or Python) function to find these classes. Of course I've already tried something:
resid =
for i in xrange(1,841):
resid.append(i)
var('u,v')
L =
for u in [1..8]: %I found that looking for values of u and v between 1 and 8 should be enough, to find the six needed residue classes.
for v in [1..8]:
mP1_ = mP(u,v,P1)
if(mP1_[0] in divisors(840)):
L.append(mP1_[0])
for i in range(mP1_[0]):
if(i not in L):
L.append(i)
mP2_ = mP(u,v,P2)
if(mP2_[0] in divisors(840)):
L.append(mP2_[0])
for i in range(mP2_[0]):
if(i not in L):
L.append(i)
mP3_ = mP(u,v,P3)
if(mP3_[0] in divisors(840)):
L.append(mP3_[0])
for i in range(mP3_[0]):
if(i not in L):
L.append(i)
mP4_ = mP(u,v,P4)
if(mP4_[0] in divisors(840)):
L.append(mP4_[0])
for i in range(mP4_[0]):
if(i not in L):
L.append(i)
Note: the code for the function mP(u,v,P) can be found in my last post.
The list I get back only consists of elements from 0 to 140 (some repeated) and the values $1^2, 11^2$ do appear in it.
I have been searching for days now and I'm really struggling. Can someone help me please. (Wow, this post was huge. Thank you for coming to my TED-Talk).
(If there is any code missing, leave a comment down below and I'll add it. Thank you.)
Immeasurably grateful!
number-theory conjectures python
add a comment |
(This question is the 'sequel' to my first question, that you can find here: Erdős-Straus-conjecture using polynomials in Python).
With the help of contributor Yong Hao Ng, I managed to write a Sage function to calculate the value of an integer $m$ such that the coefficients in $frac4k = frac1{x(k)} + frac1{y(k)} + frac1{z(k)}$ (1) would be integers too. One thing I noticed was that $x(k),y(k)$ and $z(k)$ represent integers when $k equiv b$ (mod $m$) $iff k = am + b$ ($a,b,m in mathbb{Z}$) (Am I correct?). This means that (1) can be rewritten as follows: $frac4{am+b} = frac1{x(am+b)} + frac1{y(am+b)} + frac1{z(am+b)} = frac1{x'(a)} + frac1{y'(a)} = frac1{z'(a)}$, with $x'(a),y'(a)$ and $z'(a)$ polynomials in $a$ that are automatically integers for all $a in mathbb{Z}$.
I have done this substitution for the four polynomials that I mentioned in my previous question.
m = mP(u,v,P1)[0]
show(p1(k=a*m+b))
m = mP(u,v,P2)[0]
show(p2(k=a*m+b))
m = mP(u,v,P3)[0]
show(p3(k=a*m+b))
m = mP(u,v,P4)[0]
show(p4(k=a*m+b))
I have checked the output and I seems correct. (For example for (P1) I get back: $frac1{(160a+b)u} + frac1{(160a+b)v} + frac{4uv-u-v}{(160a+b)uv}$).
So, now to the question. As you can see, this method (of substitution) is very useful for a lot of residue classes (especially for all residue classes up to modulo 840, except for six of them!). I've done my research and found that the six remaining open residue classes should be $1^2, 11^2, 13^2, 17^2, 19^2$ and $23^2$ mod($m$). Alas, I can't find a way to write a useful Sage (or Python) function to find these classes. Of course I've already tried something:
resid =
for i in xrange(1,841):
resid.append(i)
var('u,v')
L =
for u in [1..8]: %I found that looking for values of u and v between 1 and 8 should be enough, to find the six needed residue classes.
for v in [1..8]:
mP1_ = mP(u,v,P1)
if(mP1_[0] in divisors(840)):
L.append(mP1_[0])
for i in range(mP1_[0]):
if(i not in L):
L.append(i)
mP2_ = mP(u,v,P2)
if(mP2_[0] in divisors(840)):
L.append(mP2_[0])
for i in range(mP2_[0]):
if(i not in L):
L.append(i)
mP3_ = mP(u,v,P3)
if(mP3_[0] in divisors(840)):
L.append(mP3_[0])
for i in range(mP3_[0]):
if(i not in L):
L.append(i)
mP4_ = mP(u,v,P4)
if(mP4_[0] in divisors(840)):
L.append(mP4_[0])
for i in range(mP4_[0]):
if(i not in L):
L.append(i)
Note: the code for the function mP(u,v,P) can be found in my last post.
The list I get back only consists of elements from 0 to 140 (some repeated) and the values $1^2, 11^2$ do appear in it.
I have been searching for days now and I'm really struggling. Can someone help me please. (Wow, this post was huge. Thank you for coming to my TED-Talk).
(If there is any code missing, leave a comment down below and I'll add it. Thank you.)
Immeasurably grateful!
number-theory conjectures python
Looks cool, and I may have missed something, but what has this got to do with coding-theory? See the tag wiki for a description.
– Jyrki Lahtonen
Dec 13 '18 at 5:11
add a comment |
(This question is the 'sequel' to my first question, that you can find here: Erdős-Straus-conjecture using polynomials in Python).
With the help of contributor Yong Hao Ng, I managed to write a Sage function to calculate the value of an integer $m$ such that the coefficients in $frac4k = frac1{x(k)} + frac1{y(k)} + frac1{z(k)}$ (1) would be integers too. One thing I noticed was that $x(k),y(k)$ and $z(k)$ represent integers when $k equiv b$ (mod $m$) $iff k = am + b$ ($a,b,m in mathbb{Z}$) (Am I correct?). This means that (1) can be rewritten as follows: $frac4{am+b} = frac1{x(am+b)} + frac1{y(am+b)} + frac1{z(am+b)} = frac1{x'(a)} + frac1{y'(a)} = frac1{z'(a)}$, with $x'(a),y'(a)$ and $z'(a)$ polynomials in $a$ that are automatically integers for all $a in mathbb{Z}$.
I have done this substitution for the four polynomials that I mentioned in my previous question.
m = mP(u,v,P1)[0]
show(p1(k=a*m+b))
m = mP(u,v,P2)[0]
show(p2(k=a*m+b))
m = mP(u,v,P3)[0]
show(p3(k=a*m+b))
m = mP(u,v,P4)[0]
show(p4(k=a*m+b))
I have checked the output and I seems correct. (For example for (P1) I get back: $frac1{(160a+b)u} + frac1{(160a+b)v} + frac{4uv-u-v}{(160a+b)uv}$).
So, now to the question. As you can see, this method (of substitution) is very useful for a lot of residue classes (especially for all residue classes up to modulo 840, except for six of them!). I've done my research and found that the six remaining open residue classes should be $1^2, 11^2, 13^2, 17^2, 19^2$ and $23^2$ mod($m$). Alas, I can't find a way to write a useful Sage (or Python) function to find these classes. Of course I've already tried something:
resid =
for i in xrange(1,841):
resid.append(i)
var('u,v')
L =
for u in [1..8]: %I found that looking for values of u and v between 1 and 8 should be enough, to find the six needed residue classes.
for v in [1..8]:
mP1_ = mP(u,v,P1)
if(mP1_[0] in divisors(840)):
L.append(mP1_[0])
for i in range(mP1_[0]):
if(i not in L):
L.append(i)
mP2_ = mP(u,v,P2)
if(mP2_[0] in divisors(840)):
L.append(mP2_[0])
for i in range(mP2_[0]):
if(i not in L):
L.append(i)
mP3_ = mP(u,v,P3)
if(mP3_[0] in divisors(840)):
L.append(mP3_[0])
for i in range(mP3_[0]):
if(i not in L):
L.append(i)
mP4_ = mP(u,v,P4)
if(mP4_[0] in divisors(840)):
L.append(mP4_[0])
for i in range(mP4_[0]):
if(i not in L):
L.append(i)
Note: the code for the function mP(u,v,P) can be found in my last post.
The list I get back only consists of elements from 0 to 140 (some repeated) and the values $1^2, 11^2$ do appear in it.
I have been searching for days now and I'm really struggling. Can someone help me please. (Wow, this post was huge. Thank you for coming to my TED-Talk).
(If there is any code missing, leave a comment down below and I'll add it. Thank you.)
Immeasurably grateful!
number-theory conjectures python
(This question is the 'sequel' to my first question, that you can find here: Erdős-Straus-conjecture using polynomials in Python).
With the help of contributor Yong Hao Ng, I managed to write a Sage function to calculate the value of an integer $m$ such that the coefficients in $frac4k = frac1{x(k)} + frac1{y(k)} + frac1{z(k)}$ (1) would be integers too. One thing I noticed was that $x(k),y(k)$ and $z(k)$ represent integers when $k equiv b$ (mod $m$) $iff k = am + b$ ($a,b,m in mathbb{Z}$) (Am I correct?). This means that (1) can be rewritten as follows: $frac4{am+b} = frac1{x(am+b)} + frac1{y(am+b)} + frac1{z(am+b)} = frac1{x'(a)} + frac1{y'(a)} = frac1{z'(a)}$, with $x'(a),y'(a)$ and $z'(a)$ polynomials in $a$ that are automatically integers for all $a in mathbb{Z}$.
I have done this substitution for the four polynomials that I mentioned in my previous question.
m = mP(u,v,P1)[0]
show(p1(k=a*m+b))
m = mP(u,v,P2)[0]
show(p2(k=a*m+b))
m = mP(u,v,P3)[0]
show(p3(k=a*m+b))
m = mP(u,v,P4)[0]
show(p4(k=a*m+b))
I have checked the output and I seems correct. (For example for (P1) I get back: $frac1{(160a+b)u} + frac1{(160a+b)v} + frac{4uv-u-v}{(160a+b)uv}$).
So, now to the question. As you can see, this method (of substitution) is very useful for a lot of residue classes (especially for all residue classes up to modulo 840, except for six of them!). I've done my research and found that the six remaining open residue classes should be $1^2, 11^2, 13^2, 17^2, 19^2$ and $23^2$ mod($m$). Alas, I can't find a way to write a useful Sage (or Python) function to find these classes. Of course I've already tried something:
resid =
for i in xrange(1,841):
resid.append(i)
var('u,v')
L =
for u in [1..8]: %I found that looking for values of u and v between 1 and 8 should be enough, to find the six needed residue classes.
for v in [1..8]:
mP1_ = mP(u,v,P1)
if(mP1_[0] in divisors(840)):
L.append(mP1_[0])
for i in range(mP1_[0]):
if(i not in L):
L.append(i)
mP2_ = mP(u,v,P2)
if(mP2_[0] in divisors(840)):
L.append(mP2_[0])
for i in range(mP2_[0]):
if(i not in L):
L.append(i)
mP3_ = mP(u,v,P3)
if(mP3_[0] in divisors(840)):
L.append(mP3_[0])
for i in range(mP3_[0]):
if(i not in L):
L.append(i)
mP4_ = mP(u,v,P4)
if(mP4_[0] in divisors(840)):
L.append(mP4_[0])
for i in range(mP4_[0]):
if(i not in L):
L.append(i)
Note: the code for the function mP(u,v,P) can be found in my last post.
The list I get back only consists of elements from 0 to 140 (some repeated) and the values $1^2, 11^2$ do appear in it.
I have been searching for days now and I'm really struggling. Can someone help me please. (Wow, this post was huge. Thank you for coming to my TED-Talk).
(If there is any code missing, leave a comment down below and I'll add it. Thank you.)
Immeasurably grateful!
number-theory conjectures python
number-theory conjectures python
edited Dec 13 '18 at 7:49
Zachary
asked Dec 12 '18 at 22:33
ZacharyZachary
235
235
Looks cool, and I may have missed something, but what has this got to do with coding-theory? See the tag wiki for a description.
– Jyrki Lahtonen
Dec 13 '18 at 5:11
add a comment |
Looks cool, and I may have missed something, but what has this got to do with coding-theory? See the tag wiki for a description.
– Jyrki Lahtonen
Dec 13 '18 at 5:11
Looks cool, and I may have missed something, but what has this got to do with coding-theory? See the tag wiki for a description.
– Jyrki Lahtonen
Dec 13 '18 at 5:11
Looks cool, and I may have missed something, but what has this got to do with coding-theory? See the tag wiki for a description.
– Jyrki Lahtonen
Dec 13 '18 at 5:11
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3037311%2ferd%25c5%2591s-straus-conjecture-and-residue-classes-modulo-840-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3037311%2ferd%25c5%2591s-straus-conjecture-and-residue-classes-modulo-840-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Looks cool, and I may have missed something, but what has this got to do with coding-theory? See the tag wiki for a description.
– Jyrki Lahtonen
Dec 13 '18 at 5:11