def sq(i): return i**2 def increase(n): """Returns three values from three different ways to determine what the increase from n-1 to n was.""" return 2*(n-1)+1, 2*n-1, sq(n)-sq(n-1) for i in range(1,101): print increase(i) ##for i in range(1, 100): ## print str(i).zfill(7) + ':\t'+str(sq(i))+'\t+'+str(sq(i+1)-sq(i))