Skip to content

Instantly share code, notes, and snippets.

@grondilu
Created June 5, 2015 15:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save grondilu/d33f57b8820cc5fd4562 to your computer and use it in GitHub Desktop.
$ perl6 -e 'say $_, ": ", .polymod(2 xx *) for ^20;'
0:
1: 1
2: 0 1
3: 1 1
4: 0 0 1
5: 1 0 1
6: 0 1 1
7: 1 1 1
8: 0 0 0 1
9: 1 0 0 1
10: 0 1 0 1
11: 1 1 0 1
12: 0 0 1 1
13: 1 0 1 1
14: 0 1 1 1
15: 1 2 3 4
16: 1 2 3 4 5
17: 1 2 3 4 5
18: 1 2 3 4 5
19: 1 2 3 4 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment