iterations on a calculator












1












$begingroup$


Ok, first off I am not a mathematician, so I apologize if terms are misused, I will try to get my questions across with plain English so I don't stumble on using a term that may mean something specific to a mathematician.



Starting with "iterations" (it may mean something specific - but I mean it in general)



For instance - here is the scenario hat made me want to do something I couldn't figure out how to do - but I am sure there is a way to express it in a formula to get my answer.



Proposition - Put a quarter a day in the jar - have $9125 in a year...



Clearly this assertion was wrong, and simple math (.25*365) tells anyone that you'll have $91.25 in a year.



But then I wanted to see what would happen in you started at .25 and "added a quarter to the last amount added every day...what would you get?



> day 1 = add .25 (total=.25) 
> day 2 = add .25 + .25 (total=.75)
> day 3 =
> add .5 + .25 (total=1.5)
> day 4 = add .75 + .25 (total=2.25)
> etc... to 365 days


How would you express this on a calculator (normal generally available software calculator or spreadsheet)



Like wise (second question) - how would you figure doubling an amount for x iterations?



Thanks










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    The original can be phrased as a recursive sequence $a_0 = 0, a_n = a_{n-1}+0.25$ to which the closed form as you should clearly be able to see is $a_n = 0.25n$. The second question you pose is a recursive sequence of the form $a_0 =0, a_n = a_{n-1}+0.25n$ to which the closed form is $frac{1}{4}times frac{n(n+1)}{2}$, that is a quarter of the $n$'th triangle number. You would have $a_n = 16698.75$. For information on how to solve this and other such things by hand, look up linear recurrence equations.
    $endgroup$
    – JMoravitz
    Jan 16 at 17:02








  • 1




    $begingroup$
    In mathmatics this is called a "recursive definition" and it is define as $b_{n+1} = b_n + .25$ and our running total is $t_{n+1} = t_n + b_{n+1}$. In computer programing it can be in the form of a function that calls itself. function daily_add(n){if (n==0) return 0; else return daily_add(n-1) + .25;}
    $endgroup$
    – fleablood
    Jan 16 at 17:04
















1












$begingroup$


Ok, first off I am not a mathematician, so I apologize if terms are misused, I will try to get my questions across with plain English so I don't stumble on using a term that may mean something specific to a mathematician.



Starting with "iterations" (it may mean something specific - but I mean it in general)



For instance - here is the scenario hat made me want to do something I couldn't figure out how to do - but I am sure there is a way to express it in a formula to get my answer.



Proposition - Put a quarter a day in the jar - have $9125 in a year...



Clearly this assertion was wrong, and simple math (.25*365) tells anyone that you'll have $91.25 in a year.



But then I wanted to see what would happen in you started at .25 and "added a quarter to the last amount added every day...what would you get?



> day 1 = add .25 (total=.25) 
> day 2 = add .25 + .25 (total=.75)
> day 3 =
> add .5 + .25 (total=1.5)
> day 4 = add .75 + .25 (total=2.25)
> etc... to 365 days


How would you express this on a calculator (normal generally available software calculator or spreadsheet)



Like wise (second question) - how would you figure doubling an amount for x iterations?



Thanks










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    The original can be phrased as a recursive sequence $a_0 = 0, a_n = a_{n-1}+0.25$ to which the closed form as you should clearly be able to see is $a_n = 0.25n$. The second question you pose is a recursive sequence of the form $a_0 =0, a_n = a_{n-1}+0.25n$ to which the closed form is $frac{1}{4}times frac{n(n+1)}{2}$, that is a quarter of the $n$'th triangle number. You would have $a_n = 16698.75$. For information on how to solve this and other such things by hand, look up linear recurrence equations.
    $endgroup$
    – JMoravitz
    Jan 16 at 17:02








  • 1




    $begingroup$
    In mathmatics this is called a "recursive definition" and it is define as $b_{n+1} = b_n + .25$ and our running total is $t_{n+1} = t_n + b_{n+1}$. In computer programing it can be in the form of a function that calls itself. function daily_add(n){if (n==0) return 0; else return daily_add(n-1) + .25;}
    $endgroup$
    – fleablood
    Jan 16 at 17:04














1












1








1





$begingroup$


Ok, first off I am not a mathematician, so I apologize if terms are misused, I will try to get my questions across with plain English so I don't stumble on using a term that may mean something specific to a mathematician.



Starting with "iterations" (it may mean something specific - but I mean it in general)



For instance - here is the scenario hat made me want to do something I couldn't figure out how to do - but I am sure there is a way to express it in a formula to get my answer.



Proposition - Put a quarter a day in the jar - have $9125 in a year...



Clearly this assertion was wrong, and simple math (.25*365) tells anyone that you'll have $91.25 in a year.



But then I wanted to see what would happen in you started at .25 and "added a quarter to the last amount added every day...what would you get?



> day 1 = add .25 (total=.25) 
> day 2 = add .25 + .25 (total=.75)
> day 3 =
> add .5 + .25 (total=1.5)
> day 4 = add .75 + .25 (total=2.25)
> etc... to 365 days


How would you express this on a calculator (normal generally available software calculator or spreadsheet)



Like wise (second question) - how would you figure doubling an amount for x iterations?



Thanks










share|cite|improve this question









$endgroup$




Ok, first off I am not a mathematician, so I apologize if terms are misused, I will try to get my questions across with plain English so I don't stumble on using a term that may mean something specific to a mathematician.



Starting with "iterations" (it may mean something specific - but I mean it in general)



For instance - here is the scenario hat made me want to do something I couldn't figure out how to do - but I am sure there is a way to express it in a formula to get my answer.



Proposition - Put a quarter a day in the jar - have $9125 in a year...



Clearly this assertion was wrong, and simple math (.25*365) tells anyone that you'll have $91.25 in a year.



But then I wanted to see what would happen in you started at .25 and "added a quarter to the last amount added every day...what would you get?



> day 1 = add .25 (total=.25) 
> day 2 = add .25 + .25 (total=.75)
> day 3 =
> add .5 + .25 (total=1.5)
> day 4 = add .75 + .25 (total=2.25)
> etc... to 365 days


How would you express this on a calculator (normal generally available software calculator or spreadsheet)



Like wise (second question) - how would you figure doubling an amount for x iterations?



Thanks







sequences-and-series






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 16 at 16:55









jpmyobjpmyob

1061




1061








  • 1




    $begingroup$
    The original can be phrased as a recursive sequence $a_0 = 0, a_n = a_{n-1}+0.25$ to which the closed form as you should clearly be able to see is $a_n = 0.25n$. The second question you pose is a recursive sequence of the form $a_0 =0, a_n = a_{n-1}+0.25n$ to which the closed form is $frac{1}{4}times frac{n(n+1)}{2}$, that is a quarter of the $n$'th triangle number. You would have $a_n = 16698.75$. For information on how to solve this and other such things by hand, look up linear recurrence equations.
    $endgroup$
    – JMoravitz
    Jan 16 at 17:02








  • 1




    $begingroup$
    In mathmatics this is called a "recursive definition" and it is define as $b_{n+1} = b_n + .25$ and our running total is $t_{n+1} = t_n + b_{n+1}$. In computer programing it can be in the form of a function that calls itself. function daily_add(n){if (n==0) return 0; else return daily_add(n-1) + .25;}
    $endgroup$
    – fleablood
    Jan 16 at 17:04














  • 1




    $begingroup$
    The original can be phrased as a recursive sequence $a_0 = 0, a_n = a_{n-1}+0.25$ to which the closed form as you should clearly be able to see is $a_n = 0.25n$. The second question you pose is a recursive sequence of the form $a_0 =0, a_n = a_{n-1}+0.25n$ to which the closed form is $frac{1}{4}times frac{n(n+1)}{2}$, that is a quarter of the $n$'th triangle number. You would have $a_n = 16698.75$. For information on how to solve this and other such things by hand, look up linear recurrence equations.
    $endgroup$
    – JMoravitz
    Jan 16 at 17:02








  • 1




    $begingroup$
    In mathmatics this is called a "recursive definition" and it is define as $b_{n+1} = b_n + .25$ and our running total is $t_{n+1} = t_n + b_{n+1}$. In computer programing it can be in the form of a function that calls itself. function daily_add(n){if (n==0) return 0; else return daily_add(n-1) + .25;}
    $endgroup$
    – fleablood
    Jan 16 at 17:04








1




1




$begingroup$
The original can be phrased as a recursive sequence $a_0 = 0, a_n = a_{n-1}+0.25$ to which the closed form as you should clearly be able to see is $a_n = 0.25n$. The second question you pose is a recursive sequence of the form $a_0 =0, a_n = a_{n-1}+0.25n$ to which the closed form is $frac{1}{4}times frac{n(n+1)}{2}$, that is a quarter of the $n$'th triangle number. You would have $a_n = 16698.75$. For information on how to solve this and other such things by hand, look up linear recurrence equations.
$endgroup$
– JMoravitz
Jan 16 at 17:02






$begingroup$
The original can be phrased as a recursive sequence $a_0 = 0, a_n = a_{n-1}+0.25$ to which the closed form as you should clearly be able to see is $a_n = 0.25n$. The second question you pose is a recursive sequence of the form $a_0 =0, a_n = a_{n-1}+0.25n$ to which the closed form is $frac{1}{4}times frac{n(n+1)}{2}$, that is a quarter of the $n$'th triangle number. You would have $a_n = 16698.75$. For information on how to solve this and other such things by hand, look up linear recurrence equations.
$endgroup$
– JMoravitz
Jan 16 at 17:02






1




1




$begingroup$
In mathmatics this is called a "recursive definition" and it is define as $b_{n+1} = b_n + .25$ and our running total is $t_{n+1} = t_n + b_{n+1}$. In computer programing it can be in the form of a function that calls itself. function daily_add(n){if (n==0) return 0; else return daily_add(n-1) + .25;}
$endgroup$
– fleablood
Jan 16 at 17:04




$begingroup$
In mathmatics this is called a "recursive definition" and it is define as $b_{n+1} = b_n + .25$ and our running total is $t_{n+1} = t_n + b_{n+1}$. In computer programing it can be in the form of a function that calls itself. function daily_add(n){if (n==0) return 0; else return daily_add(n-1) + .25;}
$endgroup$
– fleablood
Jan 16 at 17:04










2 Answers
2






active

oldest

votes


















1












$begingroup$

Let $a_{n}$ denote the amount that you are adding to the jar on day $n$. So $$a_{1}=.25, a_{2}=.5, a_{3} = .75,..., a_{n}=.25n$$



Then the amount that you have in the jar at day $n$ is your starting amount, which in this case is $0$, plus all of the amounts you've added up to this point. That is, the amount you have at day $n$ is
$$sum_{k=1}^{n}a_{k}=sum_{k=1}^{n}.25k=.25sum_{k=1}^{n}k=.25frac{k(k+1)}{2}=frac{k(k+1)}{8}$$



Here I used the well-known identity
$$sum_{k=1}^{n}k=frac{k(k+1)}{2}$$






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    You asked how to perform your calculation in a spreadsheet. Here is one way to do it. I am assuming you are using Excel or something similar.




    1. Enter 0.25 in call A1.

    2. Enter =A1+0.25 in call A2.

    3. Enter =A1 in cell B1.

    4. Enter =B1+A2 in cell B2.

    5. Select and copy cells A2 and B2.

    6. Paste into the rectangular region with upper left hand corner cell A3 and lower right-hand corner B365.


    When you are done, column A will contain the amount to be added each day, and column B will contain the total amount in your bank on each day, so the total amount in your bank on day 365 will appear in cell B365.






    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%2f3075974%2fiterations-on-a-calculator%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









      1












      $begingroup$

      Let $a_{n}$ denote the amount that you are adding to the jar on day $n$. So $$a_{1}=.25, a_{2}=.5, a_{3} = .75,..., a_{n}=.25n$$



      Then the amount that you have in the jar at day $n$ is your starting amount, which in this case is $0$, plus all of the amounts you've added up to this point. That is, the amount you have at day $n$ is
      $$sum_{k=1}^{n}a_{k}=sum_{k=1}^{n}.25k=.25sum_{k=1}^{n}k=.25frac{k(k+1)}{2}=frac{k(k+1)}{8}$$



      Here I used the well-known identity
      $$sum_{k=1}^{n}k=frac{k(k+1)}{2}$$






      share|cite|improve this answer









      $endgroup$


















        1












        $begingroup$

        Let $a_{n}$ denote the amount that you are adding to the jar on day $n$. So $$a_{1}=.25, a_{2}=.5, a_{3} = .75,..., a_{n}=.25n$$



        Then the amount that you have in the jar at day $n$ is your starting amount, which in this case is $0$, plus all of the amounts you've added up to this point. That is, the amount you have at day $n$ is
        $$sum_{k=1}^{n}a_{k}=sum_{k=1}^{n}.25k=.25sum_{k=1}^{n}k=.25frac{k(k+1)}{2}=frac{k(k+1)}{8}$$



        Here I used the well-known identity
        $$sum_{k=1}^{n}k=frac{k(k+1)}{2}$$






        share|cite|improve this answer









        $endgroup$
















          1












          1








          1





          $begingroup$

          Let $a_{n}$ denote the amount that you are adding to the jar on day $n$. So $$a_{1}=.25, a_{2}=.5, a_{3} = .75,..., a_{n}=.25n$$



          Then the amount that you have in the jar at day $n$ is your starting amount, which in this case is $0$, plus all of the amounts you've added up to this point. That is, the amount you have at day $n$ is
          $$sum_{k=1}^{n}a_{k}=sum_{k=1}^{n}.25k=.25sum_{k=1}^{n}k=.25frac{k(k+1)}{2}=frac{k(k+1)}{8}$$



          Here I used the well-known identity
          $$sum_{k=1}^{n}k=frac{k(k+1)}{2}$$






          share|cite|improve this answer









          $endgroup$



          Let $a_{n}$ denote the amount that you are adding to the jar on day $n$. So $$a_{1}=.25, a_{2}=.5, a_{3} = .75,..., a_{n}=.25n$$



          Then the amount that you have in the jar at day $n$ is your starting amount, which in this case is $0$, plus all of the amounts you've added up to this point. That is, the amount you have at day $n$ is
          $$sum_{k=1}^{n}a_{k}=sum_{k=1}^{n}.25k=.25sum_{k=1}^{n}k=.25frac{k(k+1)}{2}=frac{k(k+1)}{8}$$



          Here I used the well-known identity
          $$sum_{k=1}^{n}k=frac{k(k+1)}{2}$$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Jan 16 at 17:01









          pwerthpwerth

          3,243417




          3,243417























              0












              $begingroup$

              You asked how to perform your calculation in a spreadsheet. Here is one way to do it. I am assuming you are using Excel or something similar.




              1. Enter 0.25 in call A1.

              2. Enter =A1+0.25 in call A2.

              3. Enter =A1 in cell B1.

              4. Enter =B1+A2 in cell B2.

              5. Select and copy cells A2 and B2.

              6. Paste into the rectangular region with upper left hand corner cell A3 and lower right-hand corner B365.


              When you are done, column A will contain the amount to be added each day, and column B will contain the total amount in your bank on each day, so the total amount in your bank on day 365 will appear in cell B365.






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                You asked how to perform your calculation in a spreadsheet. Here is one way to do it. I am assuming you are using Excel or something similar.




                1. Enter 0.25 in call A1.

                2. Enter =A1+0.25 in call A2.

                3. Enter =A1 in cell B1.

                4. Enter =B1+A2 in cell B2.

                5. Select and copy cells A2 and B2.

                6. Paste into the rectangular region with upper left hand corner cell A3 and lower right-hand corner B365.


                When you are done, column A will contain the amount to be added each day, and column B will contain the total amount in your bank on each day, so the total amount in your bank on day 365 will appear in cell B365.






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  You asked how to perform your calculation in a spreadsheet. Here is one way to do it. I am assuming you are using Excel or something similar.




                  1. Enter 0.25 in call A1.

                  2. Enter =A1+0.25 in call A2.

                  3. Enter =A1 in cell B1.

                  4. Enter =B1+A2 in cell B2.

                  5. Select and copy cells A2 and B2.

                  6. Paste into the rectangular region with upper left hand corner cell A3 and lower right-hand corner B365.


                  When you are done, column A will contain the amount to be added each day, and column B will contain the total amount in your bank on each day, so the total amount in your bank on day 365 will appear in cell B365.






                  share|cite|improve this answer









                  $endgroup$



                  You asked how to perform your calculation in a spreadsheet. Here is one way to do it. I am assuming you are using Excel or something similar.




                  1. Enter 0.25 in call A1.

                  2. Enter =A1+0.25 in call A2.

                  3. Enter =A1 in cell B1.

                  4. Enter =B1+A2 in cell B2.

                  5. Select and copy cells A2 and B2.

                  6. Paste into the rectangular region with upper left hand corner cell A3 and lower right-hand corner B365.


                  When you are done, column A will contain the amount to be added each day, and column B will contain the total amount in your bank on each day, so the total amount in your bank on day 365 will appear in cell B365.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Jan 16 at 21:05









                  awkwardawkward

                  6,14511022




                  6,14511022






























                      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%2f3075974%2fiterations-on-a-calculator%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

                      MongoDB - Not Authorized To Execute Command

                      How to fix TextFormField cause rebuild widget in Flutter

                      in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith