title: python: How to sum a series using an increment number
body: <pre><code>n = int(input('Enter n: '))
  count = 1
  sum = 0
  number = 1
  while (count &lt;= n):
      sum = sum + number
      count = count + 1
      number = number + 2
  print('Sum =', sum)
  </code></pre>
  
  <p>Is it possible to use the same concept for 1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 .... + n</p>