1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Generate a function from a list of numbers

  1. Jul 14, 2014 #1
    I have a list of numbers x = [1, 11, 21, 1211, 111221,...], I need to find the 31st number in that list.
     
  2. jcsd
  3. Jul 14, 2014 #2
    Hint: Look and say

    Hint 2: 11 should not be seen as "eleven" but rather as individual ones.
     
  4. Jul 14, 2014 #3

    pasmith

    User Avatar
    Homework Helper

    It could be anything. Truncating a sequence loses all information about subsequent terms.

    Are you told how to construct the [itex]n[/itex]th term, given the values of previous terms? If so, you need to do that.
     
  5. Jul 14, 2014 #4
    The actual question is to find the length of the 31st term.
     
    Last edited: Jul 14, 2014
  6. Jul 14, 2014 #5
    You need to recognize the pattern first. See Post #2.
     
  7. Jul 14, 2014 #6
    Hint: The next term says something, quite literally, about the previous term.
     
  8. Jul 14, 2014 #7
    Thanks for the hint, I finally got it.
     
  9. Jul 14, 2014 #8
    The problem with this type of questions is that they have more than one answer in general. For this particular sequence we have 3 possibilities that can be found at OEIS.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted