How can I stop caculate value of recursive sequence?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I want to list five terms of a sequence $(u_n)$ with $u_1 = 0$ and $u_n+1= sqrt1 + u_n$. but I don't want to reduce them.
My code



Clear[u];
u[1] := 0;
u[y_] := Sqrt[1 + u[y - 1]]
A = Table[u[k], k, 1, 5]


and got
$left0,1,sqrt2,sqrt1+sqrt2,sqrt1+sqrt1+sqrt2right$
I want to $u_3 = sqrt1 + sqrt1$, $u_4 = sqrt1 + sqrt1+ sqrt1 $.



How to get the form like that?










share|improve this question



























    up vote
    2
    down vote

    favorite












    I want to list five terms of a sequence $(u_n)$ with $u_1 = 0$ and $u_n+1= sqrt1 + u_n$. but I don't want to reduce them.
    My code



    Clear[u];
    u[1] := 0;
    u[y_] := Sqrt[1 + u[y - 1]]
    A = Table[u[k], k, 1, 5]


    and got
    $left0,1,sqrt2,sqrt1+sqrt2,sqrt1+sqrt1+sqrt2right$
    I want to $u_3 = sqrt1 + sqrt1$, $u_4 = sqrt1 + sqrt1+ sqrt1 $.



    How to get the form like that?










    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I want to list five terms of a sequence $(u_n)$ with $u_1 = 0$ and $u_n+1= sqrt1 + u_n$. but I don't want to reduce them.
      My code



      Clear[u];
      u[1] := 0;
      u[y_] := Sqrt[1 + u[y - 1]]
      A = Table[u[k], k, 1, 5]


      and got
      $left0,1,sqrt2,sqrt1+sqrt2,sqrt1+sqrt1+sqrt2right$
      I want to $u_3 = sqrt1 + sqrt1$, $u_4 = sqrt1 + sqrt1+ sqrt1 $.



      How to get the form like that?










      share|improve this question















      I want to list five terms of a sequence $(u_n)$ with $u_1 = 0$ and $u_n+1= sqrt1 + u_n$. but I don't want to reduce them.
      My code



      Clear[u];
      u[1] := 0;
      u[y_] := Sqrt[1 + u[y - 1]]
      A = Table[u[k], k, 1, 5]


      and got
      $left0,1,sqrt2,sqrt1+sqrt2,sqrt1+sqrt1+sqrt2right$
      I want to $u_3 = sqrt1 + sqrt1$, $u_4 = sqrt1 + sqrt1+ sqrt1 $.



      How to get the form like that?







      output-formatting






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 52 mins ago

























      asked 1 hour ago









      minhthien_2016

      415310




      415310




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          You can change



          u[1] := 1;


          to



          u[1] := HoldForm[1];


          The resulting expression will stay in the form you requested. However, it will not be suitable for computations. It is only usable for display purposes. To make it work for calculations again, apply ReleaseHold.



          Mathematica graphics






          share|improve this answer



























            up vote
            2
            down vote













            One can also use NestList



            NestList[Sqrt[1 + #] &, HoldForm@0, 4]





            share|improve this answer




















              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: "387"
              ;
              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: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182230%2fhow-can-i-stop-caculate-value-of-recursive-sequence%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              4
              down vote



              accepted










              You can change



              u[1] := 1;


              to



              u[1] := HoldForm[1];


              The resulting expression will stay in the form you requested. However, it will not be suitable for computations. It is only usable for display purposes. To make it work for calculations again, apply ReleaseHold.



              Mathematica graphics






              share|improve this answer
























                up vote
                4
                down vote



                accepted










                You can change



                u[1] := 1;


                to



                u[1] := HoldForm[1];


                The resulting expression will stay in the form you requested. However, it will not be suitable for computations. It is only usable for display purposes. To make it work for calculations again, apply ReleaseHold.



                Mathematica graphics






                share|improve this answer






















                  up vote
                  4
                  down vote



                  accepted







                  up vote
                  4
                  down vote



                  accepted






                  You can change



                  u[1] := 1;


                  to



                  u[1] := HoldForm[1];


                  The resulting expression will stay in the form you requested. However, it will not be suitable for computations. It is only usable for display purposes. To make it work for calculations again, apply ReleaseHold.



                  Mathematica graphics






                  share|improve this answer












                  You can change



                  u[1] := 1;


                  to



                  u[1] := HoldForm[1];


                  The resulting expression will stay in the form you requested. However, it will not be suitable for computations. It is only usable for display purposes. To make it work for calculations again, apply ReleaseHold.



                  Mathematica graphics







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 58 mins ago









                  Szabolcs

                  153k13417900




                  153k13417900




















                      up vote
                      2
                      down vote













                      One can also use NestList



                      NestList[Sqrt[1 + #] &, HoldForm@0, 4]





                      share|improve this answer
























                        up vote
                        2
                        down vote













                        One can also use NestList



                        NestList[Sqrt[1 + #] &, HoldForm@0, 4]





                        share|improve this answer






















                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          One can also use NestList



                          NestList[Sqrt[1 + #] &, HoldForm@0, 4]





                          share|improve this answer












                          One can also use NestList



                          NestList[Sqrt[1 + #] &, HoldForm@0, 4]






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 39 mins ago









                          Αλέξανδρος Ζεγγ

                          1,892721




                          1,892721



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182230%2fhow-can-i-stop-caculate-value-of-recursive-sequence%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What does second last employer means? [closed]

                              List of Gilmore Girls characters

                              Confectionery