How to find the nth term in the following sequence: 1,1,2,2,4,4,8,8,16,16 The Next CEO of Stack OverflowHow to interpret the OEIS function for the “even fractal sequence” A103391 (1, 2, 2, 3, 2, 4, 3, 5, …)What will be nth term of the following sequence?How to find the nth term of this sequence?Number of possible ordered sequencesFind nth term of sequenceHow can i find the decimal values with a list of integers?Given a sequence find nth termFind nth term for below sequenceProve $lim_ntoinftyU_n = 1$ given $0 lt U_n - 1over U_nlt 1over n$ and $U_n>0$How to find the nth term in quadratic sequence?

Which one is the true statement?

Is a distribution that is normal, but highly skewed considered Gaussian?

Is there a difference between "Fahrstuhl" and "Aufzug"

Domestic-to-international connection at Orlando (MCO)

What is meant by "large scale tonal organization?"

Legal workarounds for testamentary trust perceived as unfair

Make solar eclipses exceedingly rare, but still have new moons

TikZ: How to reverse arrow direction without switching start/end point?

The past simple of "gaslight" – "gaslighted" or "gaslit"?

Bartok - Syncopation (1): Meaning of notes in between Grand Staff

Using Rolle's theorem to show an equation has only one real root

Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?

Reference request: Grassmannian and Plucker coordinates in type B, C, D

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See

Is it ever safe to open a suspicious HTML file (e.g. email attachment)?

Writing differences on a blackboard

Why the difference in type-inference over the as-pattern in two similar function definitions?

Is there a way to save my career from absolute disaster?

How to find the nth term in the following sequence: 1,1,2,2,4,4,8,8,16,16

If the heap is zero-initialized for security, then why is the stack merely uninitialized?

Find non-case sensitive string in a mixed list of elements?

The exact meaning of 'Mom made me a sandwich'

Is it possible to use a NPN BJT as switch, from single power source?

How to count occurrences of text in a file?



How to find the nth term in the following sequence: 1,1,2,2,4,4,8,8,16,16



The Next CEO of Stack OverflowHow to interpret the OEIS function for the “even fractal sequence” A103391 (1, 2, 2, 3, 2, 4, 3, 5, …)What will be nth term of the following sequence?How to find the nth term of this sequence?Number of possible ordered sequencesFind nth term of sequenceHow can i find the decimal values with a list of integers?Given a sequence find nth termFind nth term for below sequenceProve $lim_ntoinftyU_n = 1$ given $0 lt U_n - 1over U_nlt 1over n$ and $U_n>0$How to find the nth term in quadratic sequence?










2












$begingroup$


I'm having difficulty in finding the formula for the sequence above, when I put this in wolframalpha it gave me a rather complex formula which I'm not convinced even works properly but I'm sure there's a simple way to achieve this. I've searched for many similar sequences but couldn't find anything that helped me.



I'm thinking I'll most likely need to have a condition for even numbers and another for non even numbers.



Any help would be highly appreciated.










share|cite|improve this question







New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$







  • 1




    $begingroup$
    How about using the floor function?
    $endgroup$
    – John. P
    15 mins ago
















2












$begingroup$


I'm having difficulty in finding the formula for the sequence above, when I put this in wolframalpha it gave me a rather complex formula which I'm not convinced even works properly but I'm sure there's a simple way to achieve this. I've searched for many similar sequences but couldn't find anything that helped me.



I'm thinking I'll most likely need to have a condition for even numbers and another for non even numbers.



Any help would be highly appreciated.










share|cite|improve this question







New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$







  • 1




    $begingroup$
    How about using the floor function?
    $endgroup$
    – John. P
    15 mins ago














2












2








2





$begingroup$


I'm having difficulty in finding the formula for the sequence above, when I put this in wolframalpha it gave me a rather complex formula which I'm not convinced even works properly but I'm sure there's a simple way to achieve this. I've searched for many similar sequences but couldn't find anything that helped me.



I'm thinking I'll most likely need to have a condition for even numbers and another for non even numbers.



Any help would be highly appreciated.










share|cite|improve this question







New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I'm having difficulty in finding the formula for the sequence above, when I put this in wolframalpha it gave me a rather complex formula which I'm not convinced even works properly but I'm sure there's a simple way to achieve this. I've searched for many similar sequences but couldn't find anything that helped me.



I'm thinking I'll most likely need to have a condition for even numbers and another for non even numbers.



Any help would be highly appreciated.







sequences-and-series






share|cite|improve this question







New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question







New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question






New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 20 mins ago









AnonymousAnonymous

111




111




New contributor




Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Anonymous is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 1




    $begingroup$
    How about using the floor function?
    $endgroup$
    – John. P
    15 mins ago













  • 1




    $begingroup$
    How about using the floor function?
    $endgroup$
    – John. P
    15 mins ago








1




1




$begingroup$
How about using the floor function?
$endgroup$
– John. P
15 mins ago





$begingroup$
How about using the floor function?
$endgroup$
– John. P
15 mins ago











3 Answers
3






active

oldest

votes


















4












$begingroup$

These are just powers of two. So: $2^lfloor n / 2rfloor$






share|cite|improve this answer









$endgroup$












  • $begingroup$
    I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
    $endgroup$
    – Anonymous
    3 mins ago










  • $begingroup$
    This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
    $endgroup$
    – Flowers
    25 secs ago


















0












$begingroup$

The sequence is the powers of two, each repeated twice. We can encode the latter feature using the quantity $lfloor fracn2 rfloor$, which has values $0, 0, 1, 1, 2, 2, ldots$.




So, the sequence is given (for appropriate indexing) by $$color#df0000boxeda_n := 2^lfloor n / 2 rfloor .$$







share|cite|improve this answer









$endgroup$




















    0












    $begingroup$

    Alternatively, this is an example of a sequence where the $n$th term is a fixed linear combination of the immediately previous terms: We can write it as
    $$a_n = 2 a_n - 2, qquad a_0 = a_1 = 1.$$
    Using the ansatz $a_n = C r^n$ and substituting in the recursion formula gives $C r^n = 2 C r^n - 2$. Rearranging and clearing gives the characteristic equation $r^2 - 2 = 0$, whose solutions are $pm sqrt2$. So, the general solution is
    $$a_n = A (sqrt2)^n + B(-sqrt2)^n = (sqrt2)^n [A + B(-1)^n] .$$
    Substituting the initial values $a_0 = a_1 = 1$ gives a linear system in the coefficients $A, B$.






    share|cite









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



      );






      Anonymous is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3169109%2fhow-to-find-the-nth-term-in-the-following-sequence-1-1-2-2-4-4-8-8-16-16%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4












      $begingroup$

      These are just powers of two. So: $2^lfloor n / 2rfloor$






      share|cite|improve this answer









      $endgroup$












      • $begingroup$
        I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
        $endgroup$
        – Anonymous
        3 mins ago










      • $begingroup$
        This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
        $endgroup$
        – Flowers
        25 secs ago















      4












      $begingroup$

      These are just powers of two. So: $2^lfloor n / 2rfloor$






      share|cite|improve this answer









      $endgroup$












      • $begingroup$
        I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
        $endgroup$
        – Anonymous
        3 mins ago










      • $begingroup$
        This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
        $endgroup$
        – Flowers
        25 secs ago













      4












      4








      4





      $begingroup$

      These are just powers of two. So: $2^lfloor n / 2rfloor$






      share|cite|improve this answer









      $endgroup$



      These are just powers of two. So: $2^lfloor n / 2rfloor$







      share|cite|improve this answer












      share|cite|improve this answer



      share|cite|improve this answer










      answered 16 mins ago









      FlowersFlowers

      638410




      638410











      • $begingroup$
        I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
        $endgroup$
        – Anonymous
        3 mins ago










      • $begingroup$
        This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
        $endgroup$
        – Flowers
        25 secs ago
















      • $begingroup$
        I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
        $endgroup$
        – Anonymous
        3 mins ago










      • $begingroup$
        This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
        $endgroup$
        – Flowers
        25 secs ago















      $begingroup$
      I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
      $endgroup$
      – Anonymous
      3 mins ago




      $begingroup$
      I'm not sure this works for everything, for example the 6th term should be 4 but 2^(3) = 8
      $endgroup$
      – Anonymous
      3 mins ago












      $begingroup$
      This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
      $endgroup$
      – Flowers
      25 secs ago




      $begingroup$
      This is assuming zero-indexing. So the first element is $n=0$. If you want it to be one-indexed then just subtract 1 from n in the formula.
      $endgroup$
      – Flowers
      25 secs ago











      0












      $begingroup$

      The sequence is the powers of two, each repeated twice. We can encode the latter feature using the quantity $lfloor fracn2 rfloor$, which has values $0, 0, 1, 1, 2, 2, ldots$.




      So, the sequence is given (for appropriate indexing) by $$color#df0000boxeda_n := 2^lfloor n / 2 rfloor .$$







      share|cite|improve this answer









      $endgroup$

















        0












        $begingroup$

        The sequence is the powers of two, each repeated twice. We can encode the latter feature using the quantity $lfloor fracn2 rfloor$, which has values $0, 0, 1, 1, 2, 2, ldots$.




        So, the sequence is given (for appropriate indexing) by $$color#df0000boxeda_n := 2^lfloor n / 2 rfloor .$$







        share|cite|improve this answer









        $endgroup$















          0












          0








          0





          $begingroup$

          The sequence is the powers of two, each repeated twice. We can encode the latter feature using the quantity $lfloor fracn2 rfloor$, which has values $0, 0, 1, 1, 2, 2, ldots$.




          So, the sequence is given (for appropriate indexing) by $$color#df0000boxeda_n := 2^lfloor n / 2 rfloor .$$







          share|cite|improve this answer









          $endgroup$



          The sequence is the powers of two, each repeated twice. We can encode the latter feature using the quantity $lfloor fracn2 rfloor$, which has values $0, 0, 1, 1, 2, 2, ldots$.




          So, the sequence is given (for appropriate indexing) by $$color#df0000boxeda_n := 2^lfloor n / 2 rfloor .$$








          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered 13 mins ago









          TravisTravis

          63.8k769151




          63.8k769151





















              0












              $begingroup$

              Alternatively, this is an example of a sequence where the $n$th term is a fixed linear combination of the immediately previous terms: We can write it as
              $$a_n = 2 a_n - 2, qquad a_0 = a_1 = 1.$$
              Using the ansatz $a_n = C r^n$ and substituting in the recursion formula gives $C r^n = 2 C r^n - 2$. Rearranging and clearing gives the characteristic equation $r^2 - 2 = 0$, whose solutions are $pm sqrt2$. So, the general solution is
              $$a_n = A (sqrt2)^n + B(-sqrt2)^n = (sqrt2)^n [A + B(-1)^n] .$$
              Substituting the initial values $a_0 = a_1 = 1$ gives a linear system in the coefficients $A, B$.






              share|cite









              $endgroup$

















                0












                $begingroup$

                Alternatively, this is an example of a sequence where the $n$th term is a fixed linear combination of the immediately previous terms: We can write it as
                $$a_n = 2 a_n - 2, qquad a_0 = a_1 = 1.$$
                Using the ansatz $a_n = C r^n$ and substituting in the recursion formula gives $C r^n = 2 C r^n - 2$. Rearranging and clearing gives the characteristic equation $r^2 - 2 = 0$, whose solutions are $pm sqrt2$. So, the general solution is
                $$a_n = A (sqrt2)^n + B(-sqrt2)^n = (sqrt2)^n [A + B(-1)^n] .$$
                Substituting the initial values $a_0 = a_1 = 1$ gives a linear system in the coefficients $A, B$.






                share|cite









                $endgroup$















                  0












                  0








                  0





                  $begingroup$

                  Alternatively, this is an example of a sequence where the $n$th term is a fixed linear combination of the immediately previous terms: We can write it as
                  $$a_n = 2 a_n - 2, qquad a_0 = a_1 = 1.$$
                  Using the ansatz $a_n = C r^n$ and substituting in the recursion formula gives $C r^n = 2 C r^n - 2$. Rearranging and clearing gives the characteristic equation $r^2 - 2 = 0$, whose solutions are $pm sqrt2$. So, the general solution is
                  $$a_n = A (sqrt2)^n + B(-sqrt2)^n = (sqrt2)^n [A + B(-1)^n] .$$
                  Substituting the initial values $a_0 = a_1 = 1$ gives a linear system in the coefficients $A, B$.






                  share|cite









                  $endgroup$



                  Alternatively, this is an example of a sequence where the $n$th term is a fixed linear combination of the immediately previous terms: We can write it as
                  $$a_n = 2 a_n - 2, qquad a_0 = a_1 = 1.$$
                  Using the ansatz $a_n = C r^n$ and substituting in the recursion formula gives $C r^n = 2 C r^n - 2$. Rearranging and clearing gives the characteristic equation $r^2 - 2 = 0$, whose solutions are $pm sqrt2$. So, the general solution is
                  $$a_n = A (sqrt2)^n + B(-sqrt2)^n = (sqrt2)^n [A + B(-1)^n] .$$
                  Substituting the initial values $a_0 = a_1 = 1$ gives a linear system in the coefficients $A, B$.







                  share|cite












                  share|cite



                  share|cite










                  answered 24 secs ago









                  TravisTravis

                  63.8k769151




                  63.8k769151




















                      Anonymous is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      Anonymous is a new contributor. Be nice, and check out our Code of Conduct.












                      Anonymous is a new contributor. Be nice, and check out our Code of Conduct.











                      Anonymous is a new contributor. Be nice, and check out our Code of Conduct.














                      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%2f3169109%2fhow-to-find-the-nth-term-in-the-following-sequence-1-1-2-2-4-4-8-8-16-16%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

                      Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

                      Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                      How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2