show/hide this revision's text 2 added 52 characters in body

Here is the same for $\Gamma_0(4)$:\Gamma_0(4)$ and $\Gamma(4)$:

And here is what you ask for, as far as I understand, for first few values of $n$

sage: for n in sage:FareySymbol(Gamma(4)).generators()1..6]: print n, FareySymbol(Gamma0(2^n)).generators(), '\n'

1 [[1 1 4] [0 1], -15 4] [ 1 5 -1]4] [ 2 9 -1]]

2 16] [ [1 1]13 -36][0 1], [ 3 -4 1], [ 4 -1], 3], [ -1 0]4 -7], [ 0 4 -1]]

3 11][1 [1 8] [0 1], [ 5 -1]-63 8] [16 137 -3], 40] [ 5 89 -2]32] [ 8 289 -3], [-1 0]112] [ 0 73 -1]]

4 [[1 1][0 1], [ 5 -8 1][16 -3], , [ 25 24 -9]7], [ 64 -23], [ 9 80 -4][13 -9]-71 40] [16 105 -11], [-1 0]64] [ 0 161 -1]]

5 104] [[1 1-79 56] [ 0 1], [ 9 -1][64 -7], [19 -3][32 -5], [ 79 -14]8] [ 96 161 -17], 208][49 --16 9], [ 256 64 -47], 39], [ 9 48 -2]31], [32 -7], -24 17], [ 25 8 -9]7], [ 64 24 -23], 31],[ 27 153 -11]208] [ 32 89 -13], 128] [25 -18]-87 136] [ 32 169 -23], 272] [-1 0-103 176][ 0 64 -1]]

6 87], [ [1 1]16 -23], [0 1]-16 25], [ 9 -1][64 -7], 103], [ 101 -15]24 41],[ 128 17 -19], 32] [ 161 185 -25]424] [ 1024 217 -159], 512] [ 161 105 -26]256] [192 -103 264][ 8 -31], 15], [ 29 24 -5]55], [ 64 -11], 151], [ 109 16 -23]39], [ 128 -27], 16 41],[ 17 233 -4]608] [64 -127 344] [ 25 -15], 72] [ 37 121 -11]416] [-119 424][ 64 -19], 167], [ 25 -9]24 65], [ 64 8 -23], [ 45 16 -19]55], [ 64 -27], 16 57],[113 -49]-151 560] [ 256 33 -111], 128] [53 -29]-175 824] [ 64 41 -35], 200] [ 145 49 -81][ 256 -143], 24 89], [ 41 8 -25]31], [ 64 -39], 24 113], [ 49 8 -36]39], [ 64 8 -47],[ 64 8 -55], [-1 055][ 0 -1]]

show/hide this revision's text 1

The kfarey functionality is available in new versions of Sage, see Sage docs. You don't need to install anything extra. E.g. I can run the code given there:

$ sage 
----------------------------------------------------------------------
| Sage Version 5.1.beta6, Release Date: 2012-06-25                   |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
sage: F = FareySymbol(Gamma0(11)); F
FareySymbol(Congruence Subgroup Gamma0(11))
sage: F.generators()
[
[1 1]  [ 7 -2]  [ 8 -3]  [-1  0]
[0 1], [11 -3], [11 -4], [ 0 -1]
]
sage: 

Here is the same for $\Gamma_0(4)$:

sage: F = FareySymbol(Gamma0(4)); F
FareySymbol(Congruence Subgroup Gamma0(4))
sage: F.generators()
[
[1 1]  [ 3 -1]  [-1  0]
[0 1], [ 4 -1], [ 0 -1]
]

And here is what you ask for, as far as I understand, for first few values of $n$

sage: for n in [1..6]: print n, FareySymbol(Gamma0(2^n)).generators(), '\n'

1 [[1 1] [0 1], [ 1 -1] [ 2 -1]]

2 [[1 1] [0 1], [ 3 -1] [ 4 -1], [-1 0] [ 0 -1]]

3 [[1 1] [0 1], [ 5 -1] [16 -3], [ 5 -2] [ 8 -3], [-1 0] [ 0 -1]]

4 [[1 1] [0 1], [ 5 -1] [16 -3], [ 25 -9] [ 64 -23], [ 9 -4] [16 -7], [ 13 -9] [ 16 -11], [-1 0] [ 0 -1]]

5 [[1 1] [0 1], [ 9 -1] [64 -7], [19 -3] [32 -5], [ 79 -14] [ 96 -17], [ 49 -9] [256 -47], [ 9 -2] [32 -7], [ 25 -9] [ 64 -23], [ 27 -11] [ 32 -13], [ 25 -18] [ 32 -23], [-1 0] [ 0 -1]]

6 [[1 1] [0 1], [ 9 -1] [64 -7], [101 -15] [128 -19], [ 161 -25] [1024 -159], [161 -26] [192 -31], [ 29 -5] [ 64 -11], [109 -23] [128 -27], [ 17 -4] [ 64 -15], [ 37 -11] [ 64 -19], [ 25 -9] [ 64 -23], [ 45 -19] [ 64 -27], [ 113 -49] [ 256 -111], [ 53 -29] [ 64 -35], [ 145 -81] [ 256 -143], [ 41 -25] [ 64 -39], [ 49 -36] [ 64 -47], [ 57 -49] [ 64 -55], [-1 0] [ 0 -1]]