title: Formula to Generate List of Specific Numbers
body: <p>I am relatively new to programing and I'm trying to generate a list of numbers using this formula.</p>
  
  <p>If "i" is the index of the list, the formula would be list[i] = list[i-2] + list[i-3]. The first few numbers would look like this if you started with 1,1,1.</p>
  
  <p>1,1,1,2,2,3,4,5,7,9,12,16,21,28,37,49,65,86.etc. To get each number(after the 1,1,1) you skip back one number, then take the sums of the previous two numbers e.g. 49 was from the sum of 21 and 28.</p>
  
  <p>The process of finding the numbers is similar to Fibonacci but these numbers are worlds different.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>start = [1,1,1] #the list must start with three 1's
  list1 = start #list1 starts with 'start'
  newList = []
  ammountOfNumbers = int(raw_input("Enter the ammount of numbers to be generated(n &gt;= 3): "))# to dictate length of generated list
  
  
  def generateList(newList, aList, ammountOfNumbers, *a):
      while len(aList) &lt;= ammountOfNumbers: #while length of list is less than or = size of list you want generated
          for x in range((ammountOfNumbers-1)):
              newList.append(x) #this puts value of x in index '0' 
              newList[x] = aList[len(aList)-1] + aList[len(aList)-2] # generate next number
              aList += newList #add the next generated number to the list
              x+=1
          print
          #print "Inside: ", aList #test
          #print "Length inside: ",len(aList) #test
          print
          return aList
  
  
  final = generateList(newList, list1, ammountOfNumbers) # equal to the value of list1
  print"Final List: " , final
  print
  print"Length Outside: ", len(final) #wrong value
  </code></pre>
  
  <p>It obviously doesn't work correctly right now. I'm hoping to be able to generate a list of around 500 of these numbers. Does anyone have any suggestions?
  Thanks!</p>