Created
August 28, 2014 01:55
-
-
Save dnase/f372aeea4203762afef3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def sequence_gen(n): | |
| ret = 0 | |
| i = 0 | |
| while i < n: | |
| yield ret | |
| ret = ((ret**2) + 45) % 1000000007 | |
| i += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment