Integer solutions of a variable coefficient polynomial











up vote
2
down vote

favorite












I have many equations to solve similar to this one:



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



Here, b is a base and a is a non-zero digit in a b-adic number, so $1 leq a leq b-1$



I am looking for integer solutions to this equation. Short of writing a program to test loads of numbers, what are my options for solving this?





My attempts:



Taking the equation $pmod b$ we get:
$$- 2 a equiv 0 pmod b$$
Which implies a = b/2



Taking the equation $pmod a$ we get:
$$- b^4 +b^3 - 2b^2 + 2b equiv 0 pmod a$$
$$ b^3 + 2b equiv b^4 + 2b^2 pmod a$$
$$ b^3 + 2b equiv b(b^3 + 2b) pmod a$$
$$ 1 equiv b pmod a$$
^something seems wrong with that equation



The only solution I know of for this particular equation is:
$(b,a) = (2,1)$





Another equation that I have is this one:
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$



For which I computationally determined the solutions:



$(b,a_1,a_2) = (5,3,3)$



$(b,a_1,a_2) = (10,6,7)$



$(b,a_1,a_2) = (15,9,11)$



$(b,a_1,a_2) = (20,12,15)$



Which yielded the linear relation $(b,a_1,a_2) = (b, frac{3b}{5}, frac{4b-5}{5})$



Plugging $a_1 = frac{3b}{5}, a_2 = frac{4b-5}{5}$ into the equation works.



My motivation for this: The equations I have found link to fixed points in the Kaprekar routine of a base b number.



Thanks in advance for any and all help, Ben










share|cite|improve this question


















  • 1




    from 2nd part also could be $b^3+2b equiv 0 pmod{a}$, which can be simplified to $$b^2 equiv -2 pmod{a}$$
    – gt6989b
    Nov 16 at 12:44












  • $b^3+2b = b(b^3+2b)$ is not implying $b=1$, only if $a$ is prime!
    – Stockfish
    Nov 16 at 12:55










  • @Stockfish could you please elaborate on that? I am taking Number theory this semester and have apparently forgotten how to do modular arithmetic? Not a great sign!
    – Ben Crossley
    Nov 16 at 21:22






  • 1




    More precisely: $b^3+2b equiv b(b^3+2b) pmod a$ is implying $b equiv 1$ only if $b^3+2b$ is invertible mod $a$. For a counterexample, let $a = 3$ (consequently, $b>3$), then we have $b^3+2b equiv 3b equiv 0$ (by Fermat), i.e. any $b$ fulfills $b^3+2b equiv b(b^3+2b) pmod a$!
    – Stockfish
    Nov 17 at 22:30








  • 1




    @Ben Crossley: In the second example, do we have $1le a_1le b-1$ and $1le a_2le b-1$?
    – mathlove
    Nov 18 at 3:58















up vote
2
down vote

favorite












I have many equations to solve similar to this one:



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



Here, b is a base and a is a non-zero digit in a b-adic number, so $1 leq a leq b-1$



I am looking for integer solutions to this equation. Short of writing a program to test loads of numbers, what are my options for solving this?





My attempts:



Taking the equation $pmod b$ we get:
$$- 2 a equiv 0 pmod b$$
Which implies a = b/2



Taking the equation $pmod a$ we get:
$$- b^4 +b^3 - 2b^2 + 2b equiv 0 pmod a$$
$$ b^3 + 2b equiv b^4 + 2b^2 pmod a$$
$$ b^3 + 2b equiv b(b^3 + 2b) pmod a$$
$$ 1 equiv b pmod a$$
^something seems wrong with that equation



The only solution I know of for this particular equation is:
$(b,a) = (2,1)$





Another equation that I have is this one:
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$



For which I computationally determined the solutions:



$(b,a_1,a_2) = (5,3,3)$



$(b,a_1,a_2) = (10,6,7)$



$(b,a_1,a_2) = (15,9,11)$



$(b,a_1,a_2) = (20,12,15)$



Which yielded the linear relation $(b,a_1,a_2) = (b, frac{3b}{5}, frac{4b-5}{5})$



Plugging $a_1 = frac{3b}{5}, a_2 = frac{4b-5}{5}$ into the equation works.



My motivation for this: The equations I have found link to fixed points in the Kaprekar routine of a base b number.



Thanks in advance for any and all help, Ben










share|cite|improve this question


















  • 1




    from 2nd part also could be $b^3+2b equiv 0 pmod{a}$, which can be simplified to $$b^2 equiv -2 pmod{a}$$
    – gt6989b
    Nov 16 at 12:44












  • $b^3+2b = b(b^3+2b)$ is not implying $b=1$, only if $a$ is prime!
    – Stockfish
    Nov 16 at 12:55










  • @Stockfish could you please elaborate on that? I am taking Number theory this semester and have apparently forgotten how to do modular arithmetic? Not a great sign!
    – Ben Crossley
    Nov 16 at 21:22






  • 1




    More precisely: $b^3+2b equiv b(b^3+2b) pmod a$ is implying $b equiv 1$ only if $b^3+2b$ is invertible mod $a$. For a counterexample, let $a = 3$ (consequently, $b>3$), then we have $b^3+2b equiv 3b equiv 0$ (by Fermat), i.e. any $b$ fulfills $b^3+2b equiv b(b^3+2b) pmod a$!
    – Stockfish
    Nov 17 at 22:30








  • 1




    @Ben Crossley: In the second example, do we have $1le a_1le b-1$ and $1le a_2le b-1$?
    – mathlove
    Nov 18 at 3:58













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have many equations to solve similar to this one:



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



Here, b is a base and a is a non-zero digit in a b-adic number, so $1 leq a leq b-1$



I am looking for integer solutions to this equation. Short of writing a program to test loads of numbers, what are my options for solving this?





My attempts:



Taking the equation $pmod b$ we get:
$$- 2 a equiv 0 pmod b$$
Which implies a = b/2



Taking the equation $pmod a$ we get:
$$- b^4 +b^3 - 2b^2 + 2b equiv 0 pmod a$$
$$ b^3 + 2b equiv b^4 + 2b^2 pmod a$$
$$ b^3 + 2b equiv b(b^3 + 2b) pmod a$$
$$ 1 equiv b pmod a$$
^something seems wrong with that equation



The only solution I know of for this particular equation is:
$(b,a) = (2,1)$





Another equation that I have is this one:
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$



For which I computationally determined the solutions:



$(b,a_1,a_2) = (5,3,3)$



$(b,a_1,a_2) = (10,6,7)$



$(b,a_1,a_2) = (15,9,11)$



$(b,a_1,a_2) = (20,12,15)$



Which yielded the linear relation $(b,a_1,a_2) = (b, frac{3b}{5}, frac{4b-5}{5})$



Plugging $a_1 = frac{3b}{5}, a_2 = frac{4b-5}{5}$ into the equation works.



My motivation for this: The equations I have found link to fixed points in the Kaprekar routine of a base b number.



Thanks in advance for any and all help, Ben










share|cite|improve this question













I have many equations to solve similar to this one:



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



Here, b is a base and a is a non-zero digit in a b-adic number, so $1 leq a leq b-1$



I am looking for integer solutions to this equation. Short of writing a program to test loads of numbers, what are my options for solving this?





My attempts:



Taking the equation $pmod b$ we get:
$$- 2 a equiv 0 pmod b$$
Which implies a = b/2



Taking the equation $pmod a$ we get:
$$- b^4 +b^3 - 2b^2 + 2b equiv 0 pmod a$$
$$ b^3 + 2b equiv b^4 + 2b^2 pmod a$$
$$ b^3 + 2b equiv b(b^3 + 2b) pmod a$$
$$ 1 equiv b pmod a$$
^something seems wrong with that equation



The only solution I know of for this particular equation is:
$(b,a) = (2,1)$





Another equation that I have is this one:
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$



For which I computationally determined the solutions:



$(b,a_1,a_2) = (5,3,3)$



$(b,a_1,a_2) = (10,6,7)$



$(b,a_1,a_2) = (15,9,11)$



$(b,a_1,a_2) = (20,12,15)$



Which yielded the linear relation $(b,a_1,a_2) = (b, frac{3b}{5}, frac{4b-5}{5})$



Plugging $a_1 = frac{3b}{5}, a_2 = frac{4b-5}{5}$ into the equation works.



My motivation for this: The equations I have found link to fixed points in the Kaprekar routine of a base b number.



Thanks in advance for any and all help, Ben







polynomials modular-arithmetic problem-solving multivariate-polynomial






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 16 at 12:37









Ben Crossley

710318




710318








  • 1




    from 2nd part also could be $b^3+2b equiv 0 pmod{a}$, which can be simplified to $$b^2 equiv -2 pmod{a}$$
    – gt6989b
    Nov 16 at 12:44












  • $b^3+2b = b(b^3+2b)$ is not implying $b=1$, only if $a$ is prime!
    – Stockfish
    Nov 16 at 12:55










  • @Stockfish could you please elaborate on that? I am taking Number theory this semester and have apparently forgotten how to do modular arithmetic? Not a great sign!
    – Ben Crossley
    Nov 16 at 21:22






  • 1




    More precisely: $b^3+2b equiv b(b^3+2b) pmod a$ is implying $b equiv 1$ only if $b^3+2b$ is invertible mod $a$. For a counterexample, let $a = 3$ (consequently, $b>3$), then we have $b^3+2b equiv 3b equiv 0$ (by Fermat), i.e. any $b$ fulfills $b^3+2b equiv b(b^3+2b) pmod a$!
    – Stockfish
    Nov 17 at 22:30








  • 1




    @Ben Crossley: In the second example, do we have $1le a_1le b-1$ and $1le a_2le b-1$?
    – mathlove
    Nov 18 at 3:58














  • 1




    from 2nd part also could be $b^3+2b equiv 0 pmod{a}$, which can be simplified to $$b^2 equiv -2 pmod{a}$$
    – gt6989b
    Nov 16 at 12:44












  • $b^3+2b = b(b^3+2b)$ is not implying $b=1$, only if $a$ is prime!
    – Stockfish
    Nov 16 at 12:55










  • @Stockfish could you please elaborate on that? I am taking Number theory this semester and have apparently forgotten how to do modular arithmetic? Not a great sign!
    – Ben Crossley
    Nov 16 at 21:22






  • 1




    More precisely: $b^3+2b equiv b(b^3+2b) pmod a$ is implying $b equiv 1$ only if $b^3+2b$ is invertible mod $a$. For a counterexample, let $a = 3$ (consequently, $b>3$), then we have $b^3+2b equiv 3b equiv 0$ (by Fermat), i.e. any $b$ fulfills $b^3+2b equiv b(b^3+2b) pmod a$!
    – Stockfish
    Nov 17 at 22:30








  • 1




    @Ben Crossley: In the second example, do we have $1le a_1le b-1$ and $1le a_2le b-1$?
    – mathlove
    Nov 18 at 3:58








1




1




from 2nd part also could be $b^3+2b equiv 0 pmod{a}$, which can be simplified to $$b^2 equiv -2 pmod{a}$$
– gt6989b
Nov 16 at 12:44






from 2nd part also could be $b^3+2b equiv 0 pmod{a}$, which can be simplified to $$b^2 equiv -2 pmod{a}$$
– gt6989b
Nov 16 at 12:44














$b^3+2b = b(b^3+2b)$ is not implying $b=1$, only if $a$ is prime!
– Stockfish
Nov 16 at 12:55




$b^3+2b = b(b^3+2b)$ is not implying $b=1$, only if $a$ is prime!
– Stockfish
Nov 16 at 12:55












@Stockfish could you please elaborate on that? I am taking Number theory this semester and have apparently forgotten how to do modular arithmetic? Not a great sign!
– Ben Crossley
Nov 16 at 21:22




@Stockfish could you please elaborate on that? I am taking Number theory this semester and have apparently forgotten how to do modular arithmetic? Not a great sign!
– Ben Crossley
Nov 16 at 21:22




1




1




More precisely: $b^3+2b equiv b(b^3+2b) pmod a$ is implying $b equiv 1$ only if $b^3+2b$ is invertible mod $a$. For a counterexample, let $a = 3$ (consequently, $b>3$), then we have $b^3+2b equiv 3b equiv 0$ (by Fermat), i.e. any $b$ fulfills $b^3+2b equiv b(b^3+2b) pmod a$!
– Stockfish
Nov 17 at 22:30






More precisely: $b^3+2b equiv b(b^3+2b) pmod a$ is implying $b equiv 1$ only if $b^3+2b$ is invertible mod $a$. For a counterexample, let $a = 3$ (consequently, $b>3$), then we have $b^3+2b equiv 3b equiv 0$ (by Fermat), i.e. any $b$ fulfills $b^3+2b equiv b(b^3+2b) pmod a$!
– Stockfish
Nov 17 at 22:30






1




1




@Ben Crossley: In the second example, do we have $1le a_1le b-1$ and $1le a_2le b-1$?
– mathlove
Nov 18 at 3:58




@Ben Crossley: In the second example, do we have $1le a_1le b-1$ and $1le a_2le b-1$?
– mathlove
Nov 18 at 3:58










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










The first equation



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



can be written as



$$(b - 1) (2 a b^2 + a b + 2 a - b^3 - 2 b)=0$$



Since we have $bge 2$, dividing the both sides by $b-1 (not=0)$ gives



$$2 a b^2 + a b + 2 a - b^3 - 2 b=0$$
Solving for $a$ gives
$$a=frac{2b-1}{4}+frac{5b+2}{4(2b^2+b+2)}$$
Multiplying the both sides by $4$ gives
$$4a-2b+1=frac{5b+2}{2b^2+b+2}$$



Since the RHS has to be a positive integer, we have to have
$$frac{5b+2}{2b^2+b+2}ge 1,$$
i.e.
$$0le ble 2$$
from which $b=2$ follows.



So, the only solution for the first equation is $$color{red}{(a,b)=(1,2)}$$





The second equation
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$
can be written as
$$(1-b) (b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2)=0$$



Since we have $bge 2$, dividing the both sides by $1-b (not=0)$ gives
$$b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2=0$$
which can be written as
$$(b^2-b+1)a_1+{-2(b^2-b+1)-5b}a_2+{(b+2)(b^2-b+1)-b-4}=0$$



So, we have
$$5ba_2equiv -b-4pmod{b^2-b+1}$$
Multiplying the both sides by $b-1$ gives
$$5b(b-1)a_2equiv (b-1)(-b-4)pmod{b^2-b+1},$$
i.e.
$$5{(b^2-b+1)-1}a_2equiv -(b^2-b+1)-4b+5pmod{b^2-b+1},$$
i.e.
$$5a_2equiv 4b-5pmod{b^2-b+1}$$
So, there has to be an integer $k$ such that
$$5a_2=(b^2-b+1)k+4b-5$$
Using $1le a_2le b-1$, we have
$$5le (b^2-b+1)k+4b-5le 5b-5,$$
i.e.
$$frac{-4b+10}{b^2-b+1}le kle frac{b}{b^2-b+1}$$



Let $f(b),g(b)$ be the left fraction and the right fraction respectively.



Then, we have $f(2)=frac 23=g(2)$.



Also, we have $-1lt f(b)lt 0$ and $0lt g(b)lt 1$ for $bge 3$.



So, $k=0$ for $bge 3$ from which
$$5a_2=4b-5$$
follows.



It follows that $b=5m$ where $m$ is a positive integer and that $$a_2=4m-1,qquad a_1=3m$$ and these are sufficient.



Therefore, the only solutions for the second equation are
$$color{red}{(b,a_1,a_2)=(5m,3m,4m-1)}$$
where $m$ is any positive integer.






share|cite|improve this answer





















  • Thank you for taking the time to answer in detail.
    – Ben Crossley
    Nov 20 at 7:45










  • Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
    – Ben Crossley
    Nov 20 at 9:22






  • 1




    @Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
    – mathlove
    Nov 20 at 10:15






  • 1




    @Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
    – mathlove
    Nov 25 at 10:19








  • 1




    @Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
    – mathlove
    Nov 25 at 10:34


















up vote
0
down vote













Say $b ne 1$. Write $$ a (2b^3 - b^2 + b - 2 ) = b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^3 - b^2 + b - 2 mid b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^2+b+2mid b(b^2+2)$$



If $b$ is odd then $gcd(b,2b^2+b+2)=1$ so $$2b^2+b+2mid b^2+2 implies 2b^2+b+2leq b^2+2 $$
which is impossible.



So $b$ is even $b=2c$ and now $$4c^2+c+1mid c(4c^2+2)$$



Since $gcd(c,4c^2+c+1)=1$ we have $$4c^2+c+1mid 4c^2+2implies4c^2+c+1leq 4c^2+2$$ so $cleq 1$ and thus $c=1$, $b=2$ and $a=1$.






share|cite|improve this answer























  • Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
    – Ben Crossley
    Nov 16 at 21:25










  • I made an edit @BenCrossley
    – greedoid
    Nov 17 at 16:46











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',
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3001095%2finteger-solutions-of-a-variable-coefficient-polynomial%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










The first equation



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



can be written as



$$(b - 1) (2 a b^2 + a b + 2 a - b^3 - 2 b)=0$$



Since we have $bge 2$, dividing the both sides by $b-1 (not=0)$ gives



$$2 a b^2 + a b + 2 a - b^3 - 2 b=0$$
Solving for $a$ gives
$$a=frac{2b-1}{4}+frac{5b+2}{4(2b^2+b+2)}$$
Multiplying the both sides by $4$ gives
$$4a-2b+1=frac{5b+2}{2b^2+b+2}$$



Since the RHS has to be a positive integer, we have to have
$$frac{5b+2}{2b^2+b+2}ge 1,$$
i.e.
$$0le ble 2$$
from which $b=2$ follows.



So, the only solution for the first equation is $$color{red}{(a,b)=(1,2)}$$





The second equation
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$
can be written as
$$(1-b) (b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2)=0$$



Since we have $bge 2$, dividing the both sides by $1-b (not=0)$ gives
$$b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2=0$$
which can be written as
$$(b^2-b+1)a_1+{-2(b^2-b+1)-5b}a_2+{(b+2)(b^2-b+1)-b-4}=0$$



So, we have
$$5ba_2equiv -b-4pmod{b^2-b+1}$$
Multiplying the both sides by $b-1$ gives
$$5b(b-1)a_2equiv (b-1)(-b-4)pmod{b^2-b+1},$$
i.e.
$$5{(b^2-b+1)-1}a_2equiv -(b^2-b+1)-4b+5pmod{b^2-b+1},$$
i.e.
$$5a_2equiv 4b-5pmod{b^2-b+1}$$
So, there has to be an integer $k$ such that
$$5a_2=(b^2-b+1)k+4b-5$$
Using $1le a_2le b-1$, we have
$$5le (b^2-b+1)k+4b-5le 5b-5,$$
i.e.
$$frac{-4b+10}{b^2-b+1}le kle frac{b}{b^2-b+1}$$



Let $f(b),g(b)$ be the left fraction and the right fraction respectively.



Then, we have $f(2)=frac 23=g(2)$.



Also, we have $-1lt f(b)lt 0$ and $0lt g(b)lt 1$ for $bge 3$.



So, $k=0$ for $bge 3$ from which
$$5a_2=4b-5$$
follows.



It follows that $b=5m$ where $m$ is a positive integer and that $$a_2=4m-1,qquad a_1=3m$$ and these are sufficient.



Therefore, the only solutions for the second equation are
$$color{red}{(b,a_1,a_2)=(5m,3m,4m-1)}$$
where $m$ is any positive integer.






share|cite|improve this answer





















  • Thank you for taking the time to answer in detail.
    – Ben Crossley
    Nov 20 at 7:45










  • Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
    – Ben Crossley
    Nov 20 at 9:22






  • 1




    @Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
    – mathlove
    Nov 20 at 10:15






  • 1




    @Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
    – mathlove
    Nov 25 at 10:19








  • 1




    @Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
    – mathlove
    Nov 25 at 10:34















up vote
1
down vote



accepted










The first equation



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



can be written as



$$(b - 1) (2 a b^2 + a b + 2 a - b^3 - 2 b)=0$$



Since we have $bge 2$, dividing the both sides by $b-1 (not=0)$ gives



$$2 a b^2 + a b + 2 a - b^3 - 2 b=0$$
Solving for $a$ gives
$$a=frac{2b-1}{4}+frac{5b+2}{4(2b^2+b+2)}$$
Multiplying the both sides by $4$ gives
$$4a-2b+1=frac{5b+2}{2b^2+b+2}$$



Since the RHS has to be a positive integer, we have to have
$$frac{5b+2}{2b^2+b+2}ge 1,$$
i.e.
$$0le ble 2$$
from which $b=2$ follows.



So, the only solution for the first equation is $$color{red}{(a,b)=(1,2)}$$





The second equation
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$
can be written as
$$(1-b) (b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2)=0$$



Since we have $bge 2$, dividing the both sides by $1-b (not=0)$ gives
$$b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2=0$$
which can be written as
$$(b^2-b+1)a_1+{-2(b^2-b+1)-5b}a_2+{(b+2)(b^2-b+1)-b-4}=0$$



So, we have
$$5ba_2equiv -b-4pmod{b^2-b+1}$$
Multiplying the both sides by $b-1$ gives
$$5b(b-1)a_2equiv (b-1)(-b-4)pmod{b^2-b+1},$$
i.e.
$$5{(b^2-b+1)-1}a_2equiv -(b^2-b+1)-4b+5pmod{b^2-b+1},$$
i.e.
$$5a_2equiv 4b-5pmod{b^2-b+1}$$
So, there has to be an integer $k$ such that
$$5a_2=(b^2-b+1)k+4b-5$$
Using $1le a_2le b-1$, we have
$$5le (b^2-b+1)k+4b-5le 5b-5,$$
i.e.
$$frac{-4b+10}{b^2-b+1}le kle frac{b}{b^2-b+1}$$



Let $f(b),g(b)$ be the left fraction and the right fraction respectively.



Then, we have $f(2)=frac 23=g(2)$.



Also, we have $-1lt f(b)lt 0$ and $0lt g(b)lt 1$ for $bge 3$.



So, $k=0$ for $bge 3$ from which
$$5a_2=4b-5$$
follows.



It follows that $b=5m$ where $m$ is a positive integer and that $$a_2=4m-1,qquad a_1=3m$$ and these are sufficient.



Therefore, the only solutions for the second equation are
$$color{red}{(b,a_1,a_2)=(5m,3m,4m-1)}$$
where $m$ is any positive integer.






share|cite|improve this answer





















  • Thank you for taking the time to answer in detail.
    – Ben Crossley
    Nov 20 at 7:45










  • Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
    – Ben Crossley
    Nov 20 at 9:22






  • 1




    @Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
    – mathlove
    Nov 20 at 10:15






  • 1




    @Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
    – mathlove
    Nov 25 at 10:19








  • 1




    @Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
    – mathlove
    Nov 25 at 10:34













up vote
1
down vote



accepted







up vote
1
down vote



accepted






The first equation



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



can be written as



$$(b - 1) (2 a b^2 + a b + 2 a - b^3 - 2 b)=0$$



Since we have $bge 2$, dividing the both sides by $b-1 (not=0)$ gives



$$2 a b^2 + a b + 2 a - b^3 - 2 b=0$$
Solving for $a$ gives
$$a=frac{2b-1}{4}+frac{5b+2}{4(2b^2+b+2)}$$
Multiplying the both sides by $4$ gives
$$4a-2b+1=frac{5b+2}{2b^2+b+2}$$



Since the RHS has to be a positive integer, we have to have
$$frac{5b+2}{2b^2+b+2}ge 1,$$
i.e.
$$0le ble 2$$
from which $b=2$ follows.



So, the only solution for the first equation is $$color{red}{(a,b)=(1,2)}$$





The second equation
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$
can be written as
$$(1-b) (b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2)=0$$



Since we have $bge 2$, dividing the both sides by $1-b (not=0)$ gives
$$b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2=0$$
which can be written as
$$(b^2-b+1)a_1+{-2(b^2-b+1)-5b}a_2+{(b+2)(b^2-b+1)-b-4}=0$$



So, we have
$$5ba_2equiv -b-4pmod{b^2-b+1}$$
Multiplying the both sides by $b-1$ gives
$$5b(b-1)a_2equiv (b-1)(-b-4)pmod{b^2-b+1},$$
i.e.
$$5{(b^2-b+1)-1}a_2equiv -(b^2-b+1)-4b+5pmod{b^2-b+1},$$
i.e.
$$5a_2equiv 4b-5pmod{b^2-b+1}$$
So, there has to be an integer $k$ such that
$$5a_2=(b^2-b+1)k+4b-5$$
Using $1le a_2le b-1$, we have
$$5le (b^2-b+1)k+4b-5le 5b-5,$$
i.e.
$$frac{-4b+10}{b^2-b+1}le kle frac{b}{b^2-b+1}$$



Let $f(b),g(b)$ be the left fraction and the right fraction respectively.



Then, we have $f(2)=frac 23=g(2)$.



Also, we have $-1lt f(b)lt 0$ and $0lt g(b)lt 1$ for $bge 3$.



So, $k=0$ for $bge 3$ from which
$$5a_2=4b-5$$
follows.



It follows that $b=5m$ where $m$ is a positive integer and that $$a_2=4m-1,qquad a_1=3m$$ and these are sufficient.



Therefore, the only solutions for the second equation are
$$color{red}{(b,a_1,a_2)=(5m,3m,4m-1)}$$
where $m$ is any positive integer.






share|cite|improve this answer












The first equation



$$2 a b^3 - a b^2 + a b - 2 a - b^4 + b^3 - 2 b^2 + 2 b = 0$$



can be written as



$$(b - 1) (2 a b^2 + a b + 2 a - b^3 - 2 b)=0$$



Since we have $bge 2$, dividing the both sides by $b-1 (not=0)$ gives



$$2 a b^2 + a b + 2 a - b^3 - 2 b=0$$
Solving for $a$ gives
$$a=frac{2b-1}{4}+frac{5b+2}{4(2b^2+b+2)}$$
Multiplying the both sides by $4$ gives
$$4a-2b+1=frac{5b+2}{2b^2+b+2}$$



Since the RHS has to be a positive integer, we have to have
$$frac{5b+2}{2b^2+b+2}ge 1,$$
i.e.
$$0le ble 2$$
from which $b=2$ follows.



So, the only solution for the first equation is $$color{red}{(a,b)=(1,2)}$$





The second equation
$$-b^4 + (2a_2-a_1)b^3 + (2a_1+a_2+3)b^2 - (2a_1+a_2)b + a_1-2-2a_2 = 0$$
can be written as
$$(1-b) (b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2)=0$$



Since we have $bge 2$, dividing the both sides by $1-b (not=0)$ gives
$$b^3 + b^2 a_1 - 2 b^2 a_2 + b^2 - b a_1 - 3 b a_2 - 2 b + a_1 - 2 a_2 - 2=0$$
which can be written as
$$(b^2-b+1)a_1+{-2(b^2-b+1)-5b}a_2+{(b+2)(b^2-b+1)-b-4}=0$$



So, we have
$$5ba_2equiv -b-4pmod{b^2-b+1}$$
Multiplying the both sides by $b-1$ gives
$$5b(b-1)a_2equiv (b-1)(-b-4)pmod{b^2-b+1},$$
i.e.
$$5{(b^2-b+1)-1}a_2equiv -(b^2-b+1)-4b+5pmod{b^2-b+1},$$
i.e.
$$5a_2equiv 4b-5pmod{b^2-b+1}$$
So, there has to be an integer $k$ such that
$$5a_2=(b^2-b+1)k+4b-5$$
Using $1le a_2le b-1$, we have
$$5le (b^2-b+1)k+4b-5le 5b-5,$$
i.e.
$$frac{-4b+10}{b^2-b+1}le kle frac{b}{b^2-b+1}$$



Let $f(b),g(b)$ be the left fraction and the right fraction respectively.



Then, we have $f(2)=frac 23=g(2)$.



Also, we have $-1lt f(b)lt 0$ and $0lt g(b)lt 1$ for $bge 3$.



So, $k=0$ for $bge 3$ from which
$$5a_2=4b-5$$
follows.



It follows that $b=5m$ where $m$ is a positive integer and that $$a_2=4m-1,qquad a_1=3m$$ and these are sufficient.



Therefore, the only solutions for the second equation are
$$color{red}{(b,a_1,a_2)=(5m,3m,4m-1)}$$
where $m$ is any positive integer.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 20 at 3:22









mathlove

91.6k881214




91.6k881214












  • Thank you for taking the time to answer in detail.
    – Ben Crossley
    Nov 20 at 7:45










  • Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
    – Ben Crossley
    Nov 20 at 9:22






  • 1




    @Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
    – mathlove
    Nov 20 at 10:15






  • 1




    @Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
    – mathlove
    Nov 25 at 10:19








  • 1




    @Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
    – mathlove
    Nov 25 at 10:34


















  • Thank you for taking the time to answer in detail.
    – Ben Crossley
    Nov 20 at 7:45










  • Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
    – Ben Crossley
    Nov 20 at 9:22






  • 1




    @Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
    – mathlove
    Nov 20 at 10:15






  • 1




    @Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
    – mathlove
    Nov 25 at 10:19








  • 1




    @Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
    – mathlove
    Nov 25 at 10:34
















Thank you for taking the time to answer in detail.
– Ben Crossley
Nov 20 at 7:45




Thank you for taking the time to answer in detail.
– Ben Crossley
Nov 20 at 7:45












Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
– Ben Crossley
Nov 20 at 9:22




Am I right in thinking the method for n variables would be to expand the polynomial, factorise the terms for each $a_i$ as you did on line 4 of the second example then take the equation modular X for X that makes all but 1 a variable disappear?
– Ben Crossley
Nov 20 at 9:22




1




1




@Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
– mathlove
Nov 20 at 10:15




@Ben Crossley: The method works for two variables since we can make one variable disappear. If $nge 3$, I don't think that the method always works since it is not always possible to make all but one variable disappear.
– mathlove
Nov 20 at 10:15




1




1




@Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
– mathlove
Nov 25 at 10:19






@Ben Crossley : Note that we are considering in mod $b^2-b+1$. This can be written as $bcolor{red}{(b-1)}+1$. This is the reason how I arrived at $b-1$. I'm not sure if you are satisfied with this comment, but this is all I can say.
– mathlove
Nov 25 at 10:19






1




1




@Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
– mathlove
Nov 25 at 10:34




@Ben Crossley : So, in general, if we have $kba_2pmod{pb^2+qb+r}$ where $k$ is a constant, then I would multiply it by $pb+q$ since then we have $kb(pb+q)a_2equiv k(pb^2+qb+r-r)a_2equiv -kra_2pmod{pb^2+qb+r}$ where we could remove the $b$ in the coefficient $kb$ of $a_2$. I hope this helps.
– mathlove
Nov 25 at 10:34










up vote
0
down vote













Say $b ne 1$. Write $$ a (2b^3 - b^2 + b - 2 ) = b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^3 - b^2 + b - 2 mid b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^2+b+2mid b(b^2+2)$$



If $b$ is odd then $gcd(b,2b^2+b+2)=1$ so $$2b^2+b+2mid b^2+2 implies 2b^2+b+2leq b^2+2 $$
which is impossible.



So $b$ is even $b=2c$ and now $$4c^2+c+1mid c(4c^2+2)$$



Since $gcd(c,4c^2+c+1)=1$ we have $$4c^2+c+1mid 4c^2+2implies4c^2+c+1leq 4c^2+2$$ so $cleq 1$ and thus $c=1$, $b=2$ and $a=1$.






share|cite|improve this answer























  • Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
    – Ben Crossley
    Nov 16 at 21:25










  • I made an edit @BenCrossley
    – greedoid
    Nov 17 at 16:46















up vote
0
down vote













Say $b ne 1$. Write $$ a (2b^3 - b^2 + b - 2 ) = b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^3 - b^2 + b - 2 mid b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^2+b+2mid b(b^2+2)$$



If $b$ is odd then $gcd(b,2b^2+b+2)=1$ so $$2b^2+b+2mid b^2+2 implies 2b^2+b+2leq b^2+2 $$
which is impossible.



So $b$ is even $b=2c$ and now $$4c^2+c+1mid c(4c^2+2)$$



Since $gcd(c,4c^2+c+1)=1$ we have $$4c^2+c+1mid 4c^2+2implies4c^2+c+1leq 4c^2+2$$ so $cleq 1$ and thus $c=1$, $b=2$ and $a=1$.






share|cite|improve this answer























  • Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
    – Ben Crossley
    Nov 16 at 21:25










  • I made an edit @BenCrossley
    – greedoid
    Nov 17 at 16:46













up vote
0
down vote










up vote
0
down vote









Say $b ne 1$. Write $$ a (2b^3 - b^2 + b - 2 ) = b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^3 - b^2 + b - 2 mid b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^2+b+2mid b(b^2+2)$$



If $b$ is odd then $gcd(b,2b^2+b+2)=1$ so $$2b^2+b+2mid b^2+2 implies 2b^2+b+2leq b^2+2 $$
which is impossible.



So $b$ is even $b=2c$ and now $$4c^2+c+1mid c(4c^2+2)$$



Since $gcd(c,4c^2+c+1)=1$ we have $$4c^2+c+1mid 4c^2+2implies4c^2+c+1leq 4c^2+2$$ so $cleq 1$ and thus $c=1$, $b=2$ and $a=1$.






share|cite|improve this answer














Say $b ne 1$. Write $$ a (2b^3 - b^2 + b - 2 ) = b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^3 - b^2 + b - 2 mid b^4 - b^3 + 2 b^2 - 2 b $$



so $$2b^2+b+2mid b(b^2+2)$$



If $b$ is odd then $gcd(b,2b^2+b+2)=1$ so $$2b^2+b+2mid b^2+2 implies 2b^2+b+2leq b^2+2 $$
which is impossible.



So $b$ is even $b=2c$ and now $$4c^2+c+1mid c(4c^2+2)$$



Since $gcd(c,4c^2+c+1)=1$ we have $$4c^2+c+1mid 4c^2+2implies4c^2+c+1leq 4c^2+2$$ so $cleq 1$ and thus $c=1$, $b=2$ and $a=1$.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 17 at 16:45

























answered Nov 16 at 13:05









greedoid

35.6k114590




35.6k114590












  • Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
    – Ben Crossley
    Nov 16 at 21:25










  • I made an edit @BenCrossley
    – greedoid
    Nov 17 at 16:46


















  • Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
    – Ben Crossley
    Nov 16 at 21:25










  • I made an edit @BenCrossley
    – greedoid
    Nov 17 at 16:46
















Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
– Ben Crossley
Nov 16 at 21:25




Your answer implies that there shouldn't be any solutions, yet b=2 and a=1 is a solution? How could I apply your method to the second example? Thanks, Ben
– Ben Crossley
Nov 16 at 21:25












I made an edit @BenCrossley
– greedoid
Nov 17 at 16:46




I made an edit @BenCrossley
– greedoid
Nov 17 at 16:46


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3001095%2finteger-solutions-of-a-variable-coefficient-polynomial%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?