Find the smallest positive integer $x$ satisfying $gcd(x^n+a,(x+1)^n+a)>1$












2












$begingroup$


Given positive integers $n$ and $a$, I'd like to ask how to find the smallest positive integer $x$ satisfying $gcd(x^n+a,(x+1)^n+a)>1$?



I try using the extended Euclidean algorithm on the two polynomials to find the greatest common divisor $frac{p}{q}$. If $p$ is small, then we just need to check the solutions to $x^n+a equiv 0 (mod d)$ where $d$ divides $p$. Otherwise, it seems much harder.



I also notice that $gcd(n,phi(d))$ should be greater than $1$ in order to have a solution, which helps filter many unfavorable $d$.










share|cite|improve this question











$endgroup$












  • $begingroup$
    Did you encounter an example that seems computationally difficult?
    $endgroup$
    – metamorphy
    Jan 2 at 18:48










  • $begingroup$
    For example, $n=19$ and $a=2$. Both $p$ and $q$ are extremely large and cannot be factored easily. I believe the case is quite common for large $n$.
    $endgroup$
    – Hang Wu
    Jan 3 at 4:13












  • $begingroup$
    The procedure I've suggested below gives the resultant as $$1103 cdot 87211 cdot 31308253657 cdot 818790224665362763936013994101920313,$$ and trying $p=1103, 87211, ldots$ we find $xbmod p=473, 836, ldots$ with $473$ the solution.
    $endgroup$
    – metamorphy
    Jan 3 at 7:31










  • $begingroup$
    Funny - for $n=19$ and $a=6$ the resultant appears to be prime, thus the smallest (!!!) solution is $$x=1578270389554680057141787800241971645032008710129107338825798$$
    $endgroup$
    – metamorphy
    Jan 3 at 7:48
















2












$begingroup$


Given positive integers $n$ and $a$, I'd like to ask how to find the smallest positive integer $x$ satisfying $gcd(x^n+a,(x+1)^n+a)>1$?



I try using the extended Euclidean algorithm on the two polynomials to find the greatest common divisor $frac{p}{q}$. If $p$ is small, then we just need to check the solutions to $x^n+a equiv 0 (mod d)$ where $d$ divides $p$. Otherwise, it seems much harder.



I also notice that $gcd(n,phi(d))$ should be greater than $1$ in order to have a solution, which helps filter many unfavorable $d$.










share|cite|improve this question











$endgroup$












  • $begingroup$
    Did you encounter an example that seems computationally difficult?
    $endgroup$
    – metamorphy
    Jan 2 at 18:48










  • $begingroup$
    For example, $n=19$ and $a=2$. Both $p$ and $q$ are extremely large and cannot be factored easily. I believe the case is quite common for large $n$.
    $endgroup$
    – Hang Wu
    Jan 3 at 4:13












  • $begingroup$
    The procedure I've suggested below gives the resultant as $$1103 cdot 87211 cdot 31308253657 cdot 818790224665362763936013994101920313,$$ and trying $p=1103, 87211, ldots$ we find $xbmod p=473, 836, ldots$ with $473$ the solution.
    $endgroup$
    – metamorphy
    Jan 3 at 7:31










  • $begingroup$
    Funny - for $n=19$ and $a=6$ the resultant appears to be prime, thus the smallest (!!!) solution is $$x=1578270389554680057141787800241971645032008710129107338825798$$
    $endgroup$
    – metamorphy
    Jan 3 at 7:48














2












2








2


2



$begingroup$


Given positive integers $n$ and $a$, I'd like to ask how to find the smallest positive integer $x$ satisfying $gcd(x^n+a,(x+1)^n+a)>1$?



I try using the extended Euclidean algorithm on the two polynomials to find the greatest common divisor $frac{p}{q}$. If $p$ is small, then we just need to check the solutions to $x^n+a equiv 0 (mod d)$ where $d$ divides $p$. Otherwise, it seems much harder.



I also notice that $gcd(n,phi(d))$ should be greater than $1$ in order to have a solution, which helps filter many unfavorable $d$.










share|cite|improve this question











$endgroup$




Given positive integers $n$ and $a$, I'd like to ask how to find the smallest positive integer $x$ satisfying $gcd(x^n+a,(x+1)^n+a)>1$?



I try using the extended Euclidean algorithm on the two polynomials to find the greatest common divisor $frac{p}{q}$. If $p$ is small, then we just need to check the solutions to $x^n+a equiv 0 (mod d)$ where $d$ divides $p$. Otherwise, it seems much harder.



I also notice that $gcd(n,phi(d))$ should be greater than $1$ in order to have a solution, which helps filter many unfavorable $d$.







polynomials greatest-common-divisor






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 2 at 12:46







Hang Wu

















asked Jan 2 at 10:36









Hang WuHang Wu

478311




478311












  • $begingroup$
    Did you encounter an example that seems computationally difficult?
    $endgroup$
    – metamorphy
    Jan 2 at 18:48










  • $begingroup$
    For example, $n=19$ and $a=2$. Both $p$ and $q$ are extremely large and cannot be factored easily. I believe the case is quite common for large $n$.
    $endgroup$
    – Hang Wu
    Jan 3 at 4:13












  • $begingroup$
    The procedure I've suggested below gives the resultant as $$1103 cdot 87211 cdot 31308253657 cdot 818790224665362763936013994101920313,$$ and trying $p=1103, 87211, ldots$ we find $xbmod p=473, 836, ldots$ with $473$ the solution.
    $endgroup$
    – metamorphy
    Jan 3 at 7:31










  • $begingroup$
    Funny - for $n=19$ and $a=6$ the resultant appears to be prime, thus the smallest (!!!) solution is $$x=1578270389554680057141787800241971645032008710129107338825798$$
    $endgroup$
    – metamorphy
    Jan 3 at 7:48


















  • $begingroup$
    Did you encounter an example that seems computationally difficult?
    $endgroup$
    – metamorphy
    Jan 2 at 18:48










  • $begingroup$
    For example, $n=19$ and $a=2$. Both $p$ and $q$ are extremely large and cannot be factored easily. I believe the case is quite common for large $n$.
    $endgroup$
    – Hang Wu
    Jan 3 at 4:13












  • $begingroup$
    The procedure I've suggested below gives the resultant as $$1103 cdot 87211 cdot 31308253657 cdot 818790224665362763936013994101920313,$$ and trying $p=1103, 87211, ldots$ we find $xbmod p=473, 836, ldots$ with $473$ the solution.
    $endgroup$
    – metamorphy
    Jan 3 at 7:31










  • $begingroup$
    Funny - for $n=19$ and $a=6$ the resultant appears to be prime, thus the smallest (!!!) solution is $$x=1578270389554680057141787800241971645032008710129107338825798$$
    $endgroup$
    – metamorphy
    Jan 3 at 7:48
















$begingroup$
Did you encounter an example that seems computationally difficult?
$endgroup$
– metamorphy
Jan 2 at 18:48




$begingroup$
Did you encounter an example that seems computationally difficult?
$endgroup$
– metamorphy
Jan 2 at 18:48












$begingroup$
For example, $n=19$ and $a=2$. Both $p$ and $q$ are extremely large and cannot be factored easily. I believe the case is quite common for large $n$.
$endgroup$
– Hang Wu
Jan 3 at 4:13






$begingroup$
For example, $n=19$ and $a=2$. Both $p$ and $q$ are extremely large and cannot be factored easily. I believe the case is quite common for large $n$.
$endgroup$
– Hang Wu
Jan 3 at 4:13














$begingroup$
The procedure I've suggested below gives the resultant as $$1103 cdot 87211 cdot 31308253657 cdot 818790224665362763936013994101920313,$$ and trying $p=1103, 87211, ldots$ we find $xbmod p=473, 836, ldots$ with $473$ the solution.
$endgroup$
– metamorphy
Jan 3 at 7:31




$begingroup$
The procedure I've suggested below gives the resultant as $$1103 cdot 87211 cdot 31308253657 cdot 818790224665362763936013994101920313,$$ and trying $p=1103, 87211, ldots$ we find $xbmod p=473, 836, ldots$ with $473$ the solution.
$endgroup$
– metamorphy
Jan 3 at 7:31












$begingroup$
Funny - for $n=19$ and $a=6$ the resultant appears to be prime, thus the smallest (!!!) solution is $$x=1578270389554680057141787800241971645032008710129107338825798$$
$endgroup$
– metamorphy
Jan 3 at 7:48




$begingroup$
Funny - for $n=19$ and $a=6$ the resultant appears to be prime, thus the smallest (!!!) solution is $$x=1578270389554680057141787800241971645032008710129107338825798$$
$endgroup$
– metamorphy
Jan 3 at 7:48










1 Answer
1






active

oldest

votes


















2












$begingroup$

I don't quite understand what does $gcd(y^n+a,(y+1)^n+a)$ give you if it is computed over $mathbb{Z}[y]$ (if it is roughly what you do; otherwise, probably, we're talking about the same thing).



On the other hand, if $x$ is the solution, $d=gcd(x^n+a,(x+1)^n+a)$, and $p$ is a prime divisor of $d$, then $x$ is a common root over $mathbb{Z}/pmathbb{Z}$ of these two polynomials, and this implies that $p$ divides their resultant, which (up to sign, depending on the definition taken) is equal to
$$det{r_{i,j} : 1leqslant i,jleqslant n},qquad r_{i,j}=begin{cases}-abinom{n}{j-i},& i < j\ hfillbinom{n}{i-j},& igeqslant jend{cases}$$
(resembling the "binomial circulant" a.k.a. Wendt's determinant).



Moreover, let $n=p^k m$ with $pnmid m$. Then, over $mathbb{Z}/pmathbb{Z}$, we have
$$gcd(y^n+a,(y+1)^n+a)=g^{p^k}(y),quad g(y)=gcd(y^m+a,(y+1)^m+a).$$
As we must clearly have $pnmid a$, $x$ is a root of $g(y)$, and in fact a simple one (because $y^m+a$ has only simple roots).



This suggests the following idea. For each $p$ found, we solve $g(x)=0$ in $mathbb{Z}/pmathbb{Z}$ (I can only suggest general root-finding methods here, such as random splitting), and apply Hensel's lifting to get solutions in $mathbb{Z}/p^kmathbb{Z}$ (if needed). If $x$ exists at all, then its value modulo $p^k$ must stabilize eventually (for large enough $k$).



That's it. Definitely there are gaps to fill in - I will edit this answer along any progress.






share|cite|improve this answer











$endgroup$













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


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3059320%2ffind-the-smallest-positive-integer-x-satisfying-gcdxna-x1na1%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2












    $begingroup$

    I don't quite understand what does $gcd(y^n+a,(y+1)^n+a)$ give you if it is computed over $mathbb{Z}[y]$ (if it is roughly what you do; otherwise, probably, we're talking about the same thing).



    On the other hand, if $x$ is the solution, $d=gcd(x^n+a,(x+1)^n+a)$, and $p$ is a prime divisor of $d$, then $x$ is a common root over $mathbb{Z}/pmathbb{Z}$ of these two polynomials, and this implies that $p$ divides their resultant, which (up to sign, depending on the definition taken) is equal to
    $$det{r_{i,j} : 1leqslant i,jleqslant n},qquad r_{i,j}=begin{cases}-abinom{n}{j-i},& i < j\ hfillbinom{n}{i-j},& igeqslant jend{cases}$$
    (resembling the "binomial circulant" a.k.a. Wendt's determinant).



    Moreover, let $n=p^k m$ with $pnmid m$. Then, over $mathbb{Z}/pmathbb{Z}$, we have
    $$gcd(y^n+a,(y+1)^n+a)=g^{p^k}(y),quad g(y)=gcd(y^m+a,(y+1)^m+a).$$
    As we must clearly have $pnmid a$, $x$ is a root of $g(y)$, and in fact a simple one (because $y^m+a$ has only simple roots).



    This suggests the following idea. For each $p$ found, we solve $g(x)=0$ in $mathbb{Z}/pmathbb{Z}$ (I can only suggest general root-finding methods here, such as random splitting), and apply Hensel's lifting to get solutions in $mathbb{Z}/p^kmathbb{Z}$ (if needed). If $x$ exists at all, then its value modulo $p^k$ must stabilize eventually (for large enough $k$).



    That's it. Definitely there are gaps to fill in - I will edit this answer along any progress.






    share|cite|improve this answer











    $endgroup$


















      2












      $begingroup$

      I don't quite understand what does $gcd(y^n+a,(y+1)^n+a)$ give you if it is computed over $mathbb{Z}[y]$ (if it is roughly what you do; otherwise, probably, we're talking about the same thing).



      On the other hand, if $x$ is the solution, $d=gcd(x^n+a,(x+1)^n+a)$, and $p$ is a prime divisor of $d$, then $x$ is a common root over $mathbb{Z}/pmathbb{Z}$ of these two polynomials, and this implies that $p$ divides their resultant, which (up to sign, depending on the definition taken) is equal to
      $$det{r_{i,j} : 1leqslant i,jleqslant n},qquad r_{i,j}=begin{cases}-abinom{n}{j-i},& i < j\ hfillbinom{n}{i-j},& igeqslant jend{cases}$$
      (resembling the "binomial circulant" a.k.a. Wendt's determinant).



      Moreover, let $n=p^k m$ with $pnmid m$. Then, over $mathbb{Z}/pmathbb{Z}$, we have
      $$gcd(y^n+a,(y+1)^n+a)=g^{p^k}(y),quad g(y)=gcd(y^m+a,(y+1)^m+a).$$
      As we must clearly have $pnmid a$, $x$ is a root of $g(y)$, and in fact a simple one (because $y^m+a$ has only simple roots).



      This suggests the following idea. For each $p$ found, we solve $g(x)=0$ in $mathbb{Z}/pmathbb{Z}$ (I can only suggest general root-finding methods here, such as random splitting), and apply Hensel's lifting to get solutions in $mathbb{Z}/p^kmathbb{Z}$ (if needed). If $x$ exists at all, then its value modulo $p^k$ must stabilize eventually (for large enough $k$).



      That's it. Definitely there are gaps to fill in - I will edit this answer along any progress.






      share|cite|improve this answer











      $endgroup$
















        2












        2








        2





        $begingroup$

        I don't quite understand what does $gcd(y^n+a,(y+1)^n+a)$ give you if it is computed over $mathbb{Z}[y]$ (if it is roughly what you do; otherwise, probably, we're talking about the same thing).



        On the other hand, if $x$ is the solution, $d=gcd(x^n+a,(x+1)^n+a)$, and $p$ is a prime divisor of $d$, then $x$ is a common root over $mathbb{Z}/pmathbb{Z}$ of these two polynomials, and this implies that $p$ divides their resultant, which (up to sign, depending on the definition taken) is equal to
        $$det{r_{i,j} : 1leqslant i,jleqslant n},qquad r_{i,j}=begin{cases}-abinom{n}{j-i},& i < j\ hfillbinom{n}{i-j},& igeqslant jend{cases}$$
        (resembling the "binomial circulant" a.k.a. Wendt's determinant).



        Moreover, let $n=p^k m$ with $pnmid m$. Then, over $mathbb{Z}/pmathbb{Z}$, we have
        $$gcd(y^n+a,(y+1)^n+a)=g^{p^k}(y),quad g(y)=gcd(y^m+a,(y+1)^m+a).$$
        As we must clearly have $pnmid a$, $x$ is a root of $g(y)$, and in fact a simple one (because $y^m+a$ has only simple roots).



        This suggests the following idea. For each $p$ found, we solve $g(x)=0$ in $mathbb{Z}/pmathbb{Z}$ (I can only suggest general root-finding methods here, such as random splitting), and apply Hensel's lifting to get solutions in $mathbb{Z}/p^kmathbb{Z}$ (if needed). If $x$ exists at all, then its value modulo $p^k$ must stabilize eventually (for large enough $k$).



        That's it. Definitely there are gaps to fill in - I will edit this answer along any progress.






        share|cite|improve this answer











        $endgroup$



        I don't quite understand what does $gcd(y^n+a,(y+1)^n+a)$ give you if it is computed over $mathbb{Z}[y]$ (if it is roughly what you do; otherwise, probably, we're talking about the same thing).



        On the other hand, if $x$ is the solution, $d=gcd(x^n+a,(x+1)^n+a)$, and $p$ is a prime divisor of $d$, then $x$ is a common root over $mathbb{Z}/pmathbb{Z}$ of these two polynomials, and this implies that $p$ divides their resultant, which (up to sign, depending on the definition taken) is equal to
        $$det{r_{i,j} : 1leqslant i,jleqslant n},qquad r_{i,j}=begin{cases}-abinom{n}{j-i},& i < j\ hfillbinom{n}{i-j},& igeqslant jend{cases}$$
        (resembling the "binomial circulant" a.k.a. Wendt's determinant).



        Moreover, let $n=p^k m$ with $pnmid m$. Then, over $mathbb{Z}/pmathbb{Z}$, we have
        $$gcd(y^n+a,(y+1)^n+a)=g^{p^k}(y),quad g(y)=gcd(y^m+a,(y+1)^m+a).$$
        As we must clearly have $pnmid a$, $x$ is a root of $g(y)$, and in fact a simple one (because $y^m+a$ has only simple roots).



        This suggests the following idea. For each $p$ found, we solve $g(x)=0$ in $mathbb{Z}/pmathbb{Z}$ (I can only suggest general root-finding methods here, such as random splitting), and apply Hensel's lifting to get solutions in $mathbb{Z}/p^kmathbb{Z}$ (if needed). If $x$ exists at all, then its value modulo $p^k$ must stabilize eventually (for large enough $k$).



        That's it. Definitely there are gaps to fill in - I will edit this answer along any progress.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Jan 3 at 12:25

























        answered Jan 2 at 16:38









        metamorphymetamorphy

        3,7021621




        3,7021621






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3059320%2ffind-the-smallest-positive-integer-x-satisfying-gcdxna-x1na1%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei