Skip to content

Instantly share code, notes, and snippets.

@avisoftware
Last active March 5, 2016 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avisoftware/404149dda8429564118e to your computer and use it in GitHub Desktop.
Save avisoftware/404149dda8429564118e to your computer and use it in GitHub Desktop.
#!/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
@avisoftware
Copy link
Author

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