Solve for the generating function with $x^1, x^5, x^{10}, x^{20}, x^{50}, x^{100}, x^{500}$












0












$begingroup$


How would you find the coefficient of $x^{2000}$ in



$ = (x^0 + x + x^2 +...)(x^0 + x^5 + x^{10} +...)(x^0 + x^{10} + x^{20}+...)(x^0 + x^{20} + x^{40} + ...)(x^0 + \
x^{50} + x^{100} +...)(x^0 + x^{100} + x^{200} +...)(x^0 + x^{500} + x^{1000} +...)$



I've been trying to use Mathematica, but it's not giving me a solution (very new at using it).










share|cite|improve this question









$endgroup$








  • 4




    $begingroup$
    You need to find non-negative integer solutions to $$a+5b+10c+20d+50e+100f+500g = 2000$$
    $endgroup$
    – Fly by Night
    Dec 18 '18 at 21:35












  • $begingroup$
    @FlybyNight could you explain how to do that?
    $endgroup$
    – Math Newbie
    Dec 18 '18 at 21:39












  • $begingroup$
    You can ask WA to compute the number using command SeriesCoefficient[ 1/((1-x)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)*(1-x^500)),{x,0,2000}] (same command should work on Mathematica), the number you want is 86950230.
    $endgroup$
    – achille hui
    Dec 18 '18 at 23:52












  • $begingroup$
    @MathNewbie No, sorry. This is related to "partitions" and that is a very difficult combinatorial problem. en.wikipedia.org/wiki/Partition_(number_theory)
    $endgroup$
    – Fly by Night
    Dec 19 '18 at 0:46


















0












$begingroup$


How would you find the coefficient of $x^{2000}$ in



$ = (x^0 + x + x^2 +...)(x^0 + x^5 + x^{10} +...)(x^0 + x^{10} + x^{20}+...)(x^0 + x^{20} + x^{40} + ...)(x^0 + \
x^{50} + x^{100} +...)(x^0 + x^{100} + x^{200} +...)(x^0 + x^{500} + x^{1000} +...)$



I've been trying to use Mathematica, but it's not giving me a solution (very new at using it).










share|cite|improve this question









$endgroup$








  • 4




    $begingroup$
    You need to find non-negative integer solutions to $$a+5b+10c+20d+50e+100f+500g = 2000$$
    $endgroup$
    – Fly by Night
    Dec 18 '18 at 21:35












  • $begingroup$
    @FlybyNight could you explain how to do that?
    $endgroup$
    – Math Newbie
    Dec 18 '18 at 21:39












  • $begingroup$
    You can ask WA to compute the number using command SeriesCoefficient[ 1/((1-x)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)*(1-x^500)),{x,0,2000}] (same command should work on Mathematica), the number you want is 86950230.
    $endgroup$
    – achille hui
    Dec 18 '18 at 23:52












  • $begingroup$
    @MathNewbie No, sorry. This is related to "partitions" and that is a very difficult combinatorial problem. en.wikipedia.org/wiki/Partition_(number_theory)
    $endgroup$
    – Fly by Night
    Dec 19 '18 at 0:46
















0












0








0


0



$begingroup$


How would you find the coefficient of $x^{2000}$ in



$ = (x^0 + x + x^2 +...)(x^0 + x^5 + x^{10} +...)(x^0 + x^{10} + x^{20}+...)(x^0 + x^{20} + x^{40} + ...)(x^0 + \
x^{50} + x^{100} +...)(x^0 + x^{100} + x^{200} +...)(x^0 + x^{500} + x^{1000} +...)$



I've been trying to use Mathematica, but it's not giving me a solution (very new at using it).










share|cite|improve this question









$endgroup$




How would you find the coefficient of $x^{2000}$ in



$ = (x^0 + x + x^2 +...)(x^0 + x^5 + x^{10} +...)(x^0 + x^{10} + x^{20}+...)(x^0 + x^{20} + x^{40} + ...)(x^0 + \
x^{50} + x^{100} +...)(x^0 + x^{100} + x^{200} +...)(x^0 + x^{500} + x^{1000} +...)$



I've been trying to use Mathematica, but it's not giving me a solution (very new at using it).







combinatorics generating-functions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 18 '18 at 21:30









Math NewbieMath Newbie

428




428








  • 4




    $begingroup$
    You need to find non-negative integer solutions to $$a+5b+10c+20d+50e+100f+500g = 2000$$
    $endgroup$
    – Fly by Night
    Dec 18 '18 at 21:35












  • $begingroup$
    @FlybyNight could you explain how to do that?
    $endgroup$
    – Math Newbie
    Dec 18 '18 at 21:39












  • $begingroup$
    You can ask WA to compute the number using command SeriesCoefficient[ 1/((1-x)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)*(1-x^500)),{x,0,2000}] (same command should work on Mathematica), the number you want is 86950230.
    $endgroup$
    – achille hui
    Dec 18 '18 at 23:52












  • $begingroup$
    @MathNewbie No, sorry. This is related to "partitions" and that is a very difficult combinatorial problem. en.wikipedia.org/wiki/Partition_(number_theory)
    $endgroup$
    – Fly by Night
    Dec 19 '18 at 0:46
















  • 4




    $begingroup$
    You need to find non-negative integer solutions to $$a+5b+10c+20d+50e+100f+500g = 2000$$
    $endgroup$
    – Fly by Night
    Dec 18 '18 at 21:35












  • $begingroup$
    @FlybyNight could you explain how to do that?
    $endgroup$
    – Math Newbie
    Dec 18 '18 at 21:39












  • $begingroup$
    You can ask WA to compute the number using command SeriesCoefficient[ 1/((1-x)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)*(1-x^500)),{x,0,2000}] (same command should work on Mathematica), the number you want is 86950230.
    $endgroup$
    – achille hui
    Dec 18 '18 at 23:52












  • $begingroup$
    @MathNewbie No, sorry. This is related to "partitions" and that is a very difficult combinatorial problem. en.wikipedia.org/wiki/Partition_(number_theory)
    $endgroup$
    – Fly by Night
    Dec 19 '18 at 0:46










4




4




$begingroup$
You need to find non-negative integer solutions to $$a+5b+10c+20d+50e+100f+500g = 2000$$
$endgroup$
– Fly by Night
Dec 18 '18 at 21:35






$begingroup$
You need to find non-negative integer solutions to $$a+5b+10c+20d+50e+100f+500g = 2000$$
$endgroup$
– Fly by Night
Dec 18 '18 at 21:35














$begingroup$
@FlybyNight could you explain how to do that?
$endgroup$
– Math Newbie
Dec 18 '18 at 21:39






$begingroup$
@FlybyNight could you explain how to do that?
$endgroup$
– Math Newbie
Dec 18 '18 at 21:39














$begingroup$
You can ask WA to compute the number using command SeriesCoefficient[ 1/((1-x)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)*(1-x^500)),{x,0,2000}] (same command should work on Mathematica), the number you want is 86950230.
$endgroup$
– achille hui
Dec 18 '18 at 23:52






$begingroup$
You can ask WA to compute the number using command SeriesCoefficient[ 1/((1-x)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)*(1-x^500)),{x,0,2000}] (same command should work on Mathematica), the number you want is 86950230.
$endgroup$
– achille hui
Dec 18 '18 at 23:52














$begingroup$
@MathNewbie No, sorry. This is related to "partitions" and that is a very difficult combinatorial problem. en.wikipedia.org/wiki/Partition_(number_theory)
$endgroup$
– Fly by Night
Dec 19 '18 at 0:46






$begingroup$
@MathNewbie No, sorry. This is related to "partitions" and that is a very difficult combinatorial problem. en.wikipedia.org/wiki/Partition_(number_theory)
$endgroup$
– Fly by Night
Dec 19 '18 at 0:46












1 Answer
1






active

oldest

votes


















2












$begingroup$

So you have to find the number of non-negative integer solutions to:



$$a+5b+10c+20d+50e+100f+500g = 2000$$



A short C++ program with no more than 20 lines of code and a simple recurrence will serve for the purpose.



#include <iostream>

using namespace std;

int numSolutions(int *list, int size, int sum) {
int num = list[0];
if(size == 1) {
return (sum % num == 0)? 1: 0;
}
int count = 0, cases = sum / num;
for(int i = 0; i <= cases; i++) {
count += numSolutions(list + 1, size - 1, sum - i * num);
}
return count;
}

int main() {
int list = {500, 100, 50, 20, 10, 5, 1};
int size = 7, sum = 2000;
cout << numSolutions(list, size, sum);
}


...and the answer is: 86950230. Execution time is less than a second.






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%2f3045730%2fsolve-for-the-generating-function-with-x1-x5-x10-x20-x50-x100%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$

    So you have to find the number of non-negative integer solutions to:



    $$a+5b+10c+20d+50e+100f+500g = 2000$$



    A short C++ program with no more than 20 lines of code and a simple recurrence will serve for the purpose.



    #include <iostream>

    using namespace std;

    int numSolutions(int *list, int size, int sum) {
    int num = list[0];
    if(size == 1) {
    return (sum % num == 0)? 1: 0;
    }
    int count = 0, cases = sum / num;
    for(int i = 0; i <= cases; i++) {
    count += numSolutions(list + 1, size - 1, sum - i * num);
    }
    return count;
    }

    int main() {
    int list = {500, 100, 50, 20, 10, 5, 1};
    int size = 7, sum = 2000;
    cout << numSolutions(list, size, sum);
    }


    ...and the answer is: 86950230. Execution time is less than a second.






    share|cite|improve this answer









    $endgroup$


















      2












      $begingroup$

      So you have to find the number of non-negative integer solutions to:



      $$a+5b+10c+20d+50e+100f+500g = 2000$$



      A short C++ program with no more than 20 lines of code and a simple recurrence will serve for the purpose.



      #include <iostream>

      using namespace std;

      int numSolutions(int *list, int size, int sum) {
      int num = list[0];
      if(size == 1) {
      return (sum % num == 0)? 1: 0;
      }
      int count = 0, cases = sum / num;
      for(int i = 0; i <= cases; i++) {
      count += numSolutions(list + 1, size - 1, sum - i * num);
      }
      return count;
      }

      int main() {
      int list = {500, 100, 50, 20, 10, 5, 1};
      int size = 7, sum = 2000;
      cout << numSolutions(list, size, sum);
      }


      ...and the answer is: 86950230. Execution time is less than a second.






      share|cite|improve this answer









      $endgroup$
















        2












        2








        2





        $begingroup$

        So you have to find the number of non-negative integer solutions to:



        $$a+5b+10c+20d+50e+100f+500g = 2000$$



        A short C++ program with no more than 20 lines of code and a simple recurrence will serve for the purpose.



        #include <iostream>

        using namespace std;

        int numSolutions(int *list, int size, int sum) {
        int num = list[0];
        if(size == 1) {
        return (sum % num == 0)? 1: 0;
        }
        int count = 0, cases = sum / num;
        for(int i = 0; i <= cases; i++) {
        count += numSolutions(list + 1, size - 1, sum - i * num);
        }
        return count;
        }

        int main() {
        int list = {500, 100, 50, 20, 10, 5, 1};
        int size = 7, sum = 2000;
        cout << numSolutions(list, size, sum);
        }


        ...and the answer is: 86950230. Execution time is less than a second.






        share|cite|improve this answer









        $endgroup$



        So you have to find the number of non-negative integer solutions to:



        $$a+5b+10c+20d+50e+100f+500g = 2000$$



        A short C++ program with no more than 20 lines of code and a simple recurrence will serve for the purpose.



        #include <iostream>

        using namespace std;

        int numSolutions(int *list, int size, int sum) {
        int num = list[0];
        if(size == 1) {
        return (sum % num == 0)? 1: 0;
        }
        int count = 0, cases = sum / num;
        for(int i = 0; i <= cases; i++) {
        count += numSolutions(list + 1, size - 1, sum - i * num);
        }
        return count;
        }

        int main() {
        int list = {500, 100, 50, 20, 10, 5, 1};
        int size = 7, sum = 2000;
        cout << numSolutions(list, size, sum);
        }


        ...and the answer is: 86950230. Execution time is less than a second.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 19 '18 at 11:56









        OldboyOldboy

        8,1651936




        8,1651936






























            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%2f3045730%2fsolve-for-the-generating-function-with-x1-x5-x10-x20-x50-x100%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