We can easily get the character table of $\mathrm{PSL}(2,q)$ for some fixed small prime power $q$, we can just do (for example):



```
gap> Display(CharacterTable(PSL(2,q)));

```

I don't know how the software is doing, I guess it uses some Atlas database for $q$ small enough or computes directly. The point is that there exists a global understanding of the character table of $\mathrm{PSL}(2,q)$, see for example Section 5.2 in [Fulton & Harris](https://link.springer.com/book/10.1007%2F978-1-4612-0979-9), or page 12 in [this note](http://www2.math.umd.edu/%7Ejda/characters/characters.pdf) of J. Adams (up to [typos](https://mathoverflow.net/q/367990/34538#comment928793_367990)). I need a code computing this character table following this global understanding (in order to interpolate it for $q$ non prime-power, see why [here](https://mathoverflow.net/q/367990/34538)). I tried to write it myself but I got troubles with some ambiguities. I asked J. Adams but he does not have such a code. Now this global understanding is a well-known result, so the code I am looking for should already exist somewhere (in the source of some software, or as a private material).


**Question**: If you have such a code (that you would be willing to share), could you put it as an answer of this post?  

Otherwise, if you know somewhere (or someone) susceptible to have such a code, could you please mention it (or her/him)?


*Remark*: My laptop needed 5min36s to compute the following:



```
gap> Display(CharacterTable(PSL(2,163)));

```

whereas it should be instantaneous be above global understanding. So the computation of the character table of $\mathrm{PSL}(2,q)$ is suboptimal on gap, and the expected global code would fix that.



A global code for the character table of PSL(2,q)
The quickest way to display the character table for a fixed prime-power $q$ is:



```
Display(CharacterTable( "PSL", 2, q)

```

The *generic* character table is in fact available on GAP4 (as pointed out in private by Frank Lübeck) with the following commands:


For $q$ even:



```
gap> Print(CharacterTableFromLibrary("SL2even"));

```

For $q \equiv 1 \mod 4$:



```
gap> Print(CharacterTableFromLibrary("PSL2even"));

```

For $q \equiv 3 \mod 4$:



```
gap> Print(CharacterTableFromLibrary("PSL2odd"));

```

