Largest Known Prime, 48th Known Mersenne Prime Found
mersenne.org1 pointsby tryeng0 comments
def pascal(n):
base = max(2, 2**n)
row = (base+1)**n
return [row/base**i % i for i in range(n+1)]
Nice, but hopelessly inefficient. :) You can also calculate a binomial coefficient the same way without any looping construct (the exponential operator does the looping for you).