cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A116563 a(n) is the genus of the modular curve X_0(p) for p = prime(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 4, 5, 6, 5, 6, 7, 7, 7, 8, 8, 9, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 14, 15, 14, 16, 15, 16, 16, 17, 18, 19, 18
Offset: 1

Views

Author

Roger L. Bagula, Mar 17 2006

Keywords

Comments

Also the dimension of the space of cusp forms of weight two and level p, where p=5, 7, 11, 13, ... ranges over all primes exceeding 3. - Steven Finch, Apr 04 2007
The previous name was "Genus of Ono X0[p] points". - Felix Fröhlich, May 21 2021

Examples

			a(707) = 445 as floor((prime(707) + 1) / 12) = 445, as 707 == 11 (mod 12) which maps to 1.
		

Crossrefs

Programs

  • Java
    int a(int n){
     int p = prime(n);
     return (p - switch(p % 12){
      case 1 -> 13; case 2 -> 5; case 3 -> 7; default -> -1;}) / 12;}
  • Mathematica
    g[n_] := (Prime[n] - 13)/12 /; Mod[Prime[n], 12] - 1 == 0
    g[n_] := (Prime[n] - 5)/12 /; Mod[Prime[n], 12] - 5 == 0
    g[n_] := (Prime[n] - 7)/12 /; Mod[Prime[n], 12] - 7 == 0
    g[n_] := (Prime[n] + 1)/12 /; Mod[Prime[n], 12] - 11 == 0
    Table[g[n], {n, 3, 50}]
  • PARI
    a(n) = {my(p = prime(n), m = p % 12); if (m==1, (p-13)/12, if (m==5, (p-5)/12, if (m==7, (p-7)/12, if (m==11, (p+1)/12))));} \\ Michel Marcus, Apr 06 2018
    

Formula

From Felix Fröhlich, May 21 2021: (Start)
a(n) = A001617(prime(n)).
Let p = prime(n). Then
a(n) = (p-13)/12 if p == 1 (mod 12)
a(n) = (p-5)/12 if p == 5 (mod 12)
a(n) = (p-7)/12 if p == 7 (mod 12)
a(n) = (p+1)/12 if p == 11 (mod 12). (End)

Extensions

Offset corrected by Michel Marcus, Apr 06 2018
Edited by Felix Fröhlich, May 21 2021