Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/python
import math
i=1
next_row =2
stack = 1
while i < 100000000:
sqroot =math.sqrt(stack)
if sqroot == math.floor (sqroot):
print stack
stack=stack+next_row
next_row = next_row+1
i=i+1
Owner

avisoftware commented Mar 5, 2016

1
36
1225
41616
1413721
48024900
1631432881
55420693056
1882672131025
63955431761796
2172602007770041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment