I'm new to Python. This is a homework problem, but it is tough as I only have a little experience in Java. The code is supposed to print the first Catalan-numbers using its recursive definition:
C(n + 1) = C(n) * (4n + 2) / (n + 2)
c = 
for i in xrange(0,1000000000):
if c[i]>= 1000000000:
Index out of range. Your first
i is equal to 1 but
c only has one element, which is index 0. So just change the range to (0,1000000000).
By the way, don't use range, use xrange, it'll be faster and take less memory. When you use
range, Python creates an array of that size. An array of size 1000000000 takes a ton of memory. Instead,
xrange create an iterator so it takes much less memory.