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.

Showing 1-10 of 20 results. Next

A273445 a(n) is the number of solutions of the equation n = A001617(k).

Original entry on oeis.org

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

Views

Author

Gheorghe Coserea, May 22 2016

Keywords

Comments

The zeros of the sequence are given by A054729. The first five zeros of the sequence have indexes 150, 180, 210, 286, 304.

Examples

			For n = 0 the a(0) = 15 solutions are:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 16, 18, 25 (A091401).
For n = 1 the a(1) = 12 solutions are:
11, 14, 15, 17, 19, 20, 21, 24, 27, 32, 36, 49 (A091403).
For n = 2 the a(2) = 8 solutions are:
22, 23, 26, 28, 29, 31, 37, 50 (A091404).
		

Crossrefs

Programs

  • Mathematica
    (* b = A001617 *) nmax = 71;
    b[n_] := b[n] = If[n < 1, 0, 1 + Sum[ MoebiusMu[ d]^2 n/d / 12 - EulerPhi[ GCD[ d, n/d]] / 2, {d, Divisors[n]}] - Count[(#^2 - # + 1)/n& /@ Range[n], ?IntegerQ]/3 -Count[(#^2 + 1)/n& /@ Range[n], ?IntegerQ]/4];
    Clear[f];
    f[m_] := f[m] = Module[{}, A001617 = Array[b, m]; a[n_] := Count[A001617, n]; Table[a[n], {n, 0, nmax}]];
    f[m = nmax]; f[m = m + nmax];
    While[Print["m = ", m]; f[m] != f[m - nmax], m = m + nmax];
    A273445 = f[m] (* Jean-François Alcover, Dec 16 2018, using Michael Somos' code for A001617 *)
  • PARI
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k,1]+1)),
         h = prod(k=1, fsz, f[k,1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k,1]^(f[k,2]\2) + f[k,1]^((f[k,2]-1)\2));
    };
    A001617(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    seq(n) = {
      my(a = vector(n+1,g,0), bnd = 12*n + 18*sqrtint(n) + 100, g);
      for (k = 1, bnd, g = A001617(k);
           if (g <= n, a[g+1]++));
      return(a);
    };
    seq(72)

Formula

a(n) = card {k, n = A001617(k)}.

A091401 Numbers n such that genus of group Gamma_0(n) is zero.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 16, 18, 25
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

Comments

Equivalently, numbers n such that genus of modular curve X_0(n) is zero.

References

  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see Prop. 1.40 and 1.43.

Crossrefs

The table below is a consequence of Theorem 7.3 in Maier's paper.
N EntryID K alpha
1
2 A127776 4096 1
3 A276018 729 1
4 A002894 256 1
5 A276019 125 4
6 A093388 72 1
7 A276021 49 9
8 A081085 32 1
9 A006077 27 1
10 A276020 20 2
12 A276022 12 1
13 A276177 13 36
16 A276178 8 1
18 A276179 6 1
25 A276180 5 4

Programs

Formula

Numbers n such that A001617(n) = 0.

A029937 Genus of modular curve X_1(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 2, 5, 2, 7, 3, 5, 6, 12, 5, 12, 10, 13, 10, 22, 9, 26, 17, 21, 21, 25, 17, 40, 28, 33, 25, 51, 25, 57, 36, 41, 45, 70, 37, 69, 48, 65, 55, 92, 52, 81, 61, 85, 78, 117, 57, 126, 91, 97
Offset: 1

Views

Author

Keywords

Comments

Also the dimension of the space of cusp forms of weight two on Gamma1(n). [Steven Finch, Apr 03 2009]

References

  • F. Hirzebruch et al., Manifolds and Modular Forms, Vieweg, 2nd ed. 1994, p. 161.

Crossrefs

Cf. A001617, A029938. [Steven Finch, Apr 03 2009]

Programs

  • Maple
    with(numtheory); A029937 := proc(n) local i,j; j := 1+(1/24)*phi(n)*A001615(n); for i in divisors(n) do j := j-(1/4)*phi(i)*phi(n/i) od; j; end;
  • Mathematica
    a[n_ /; n<5] = 0; a[n_] := 1+Sum[d^2*MoebiusMu[n/d]/24 - EulerPhi[d]*EulerPhi[n/d]/4, {d, Divisors[n]}]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 13 2014 *)
  • PARI
    A029935(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, f[k,1]),
         h = prod(k=1, fsz, sqr(f[k,1]-1)*f[k,2] + sqr(f[k,1])-1));
      return(h*n\sqr(g));
    };
    a(n) = {
      if (n < 5, return(0));
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, f[k,1]),
         h = prod(k=1, fsz, sqr(f[k,1]) - 1));
      return(1 + sqr(n\g)*h/24 - A029935(n)/4);
    };
    vector(63, n, a(n))  \\ Gheorghe Coserea, Oct 23 2016

Formula

a(n) = 1 + A115000(n) - A029935(n)/4, n > 4. [Kim and Koo, Theorem 1]

A276183 Genus of the quotient of the modular curve X_0(n) by the Fricke involution.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 2, 1, 1, 1, 2, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 2, 3, 0, 3, 1, 2, 1, 1, 1, 3, 2, 2, 2, 4, 0, 2, 2, 2, 1, 3, 2, 5, 1, 2, 1, 4, 1, 4, 3, 3, 2, 4, 1, 4, 2, 4, 4, 4, 1, 3, 3, 2, 3, 3, 1, 7
Offset: 1

Views

Author

Gheorghe Coserea, Oct 21 2016

Keywords

Comments

a(n) is the genus of quotient space H/Gamma_0*(n), where H is the upper half plane and Gamma_0*(n) = Gamma_0(n) + W Gamma_0(n) is the extension of Gamma_0(n) via the involution z <-> W(z) = -n/z (see Cohn, 1988).

Examples

			G.f. = x^22 + x^28 + x^30 + x^33 + x^34 + x^37 + x^38 + x^40 + 2*x^42 + x^43 + x^44 + ...
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[n < 1, 0, 1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, Divisors@ n}] - Count[(#^2 - # + 1)/n & /@ Range@ n, ?IntegerQ]/3 - Count[(#^2 + 1)/n & /@ Range@ n, ?IntegerQ]/4];
    g[n_] := Ceiling[k0 = k /. FindRoot[EllipticK[1 - k^2]/EllipticK[k^2] == Sqrt@ n, {k, 1/2, 10^-10, 1}, WorkingPrecision -> 600, MaxIterations -> 100]; Exponent[MinimalPolynomial[RootApproximant[k0^2, 24], x], x]/2];
    r[n_] := If[MemberQ[{3, 7}, #], 3 + (# - 1)/2, 3] &@ Mod[n, 8]; a[n_] := If[n <= 4, 0, (1 + f@ n)/2 - r[n] g[n]/12]; Table[Print["a(", n, ") = ", an = a[n]]; an, {n, 102}] (* Michael De Vlieger, Oct 28 2016, after Michael Somos at A001617 and Jean-François Alcover at A000003 *)
    ClassList[n_?Negative] :=
    Select[Flatten[#, 1] &@Table[
        {i, j, (j^2 - n)/(4 i)}, {i, Sqrt[-n/3]}, {j, 1 - i, i}],
      Mod[#3, 1] == 0 && #3 >= # &&
          GCD[##] == 1 && ! (# == #3 && #2 < 0) & @@ # &]
    A001617[n_] := If[n < 1, 0,
      1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d,
         Divisors@n}] -
       Count[(#^2 - # + 1)/n & /@ Range[n], _?IntegerQ]/3 -
       Count[(#^2 + 1)/n & /@ Range[n], _?IntegerQ]/4];
    a[n_] := If[0 <= n <= 4, 0, (A001617[n] + 1)/2 - If[Mod[n, 8] == 3, 4, If[Mod[n, 8] == 7, 6, 3]] Length[ClassList[-4 n]]/12] (* David Jao, Sep 07 2020 *)
  • PARI
    A000003(n) = qfbclassno(-4*n);
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k, 1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k, 1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k, 1]+1)),
         h = prod(k=1, fsz, f[k, 1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k, 1]^(f[k, 2]\2) + f[k, 1]^((f[k, 2]-1)\2));
    };
    A001617(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    a(n) = {
      my(r = if (n%8 == 3, 4, n%8 == 7, 6, 3));
      if (n < 5, 0, (1 + A001617(n))/2 - r * A000003(n)/12);
    };
    vector(102, n, a(n))

Formula

a(n) = (1 + A001617(n))/2 - r * A000003(n)/12 for all n > 4, where r=4 for n=3 (mod 8), r=6 for n=7 (mod 8) and r=3 otherwise.
a(n) <> 4884 for all n.

Extensions

New name from David Jao, Sep 07 2020

A054729 Numbers n such that genus of modular curve X_0(N) is never equal to n.

Original entry on oeis.org

150, 180, 210, 286, 304, 312, 336, 338, 348, 350, 480, 536, 570, 598, 606, 620, 666, 678, 706, 730, 756, 780, 798, 850, 876, 896, 906, 916, 970, 1014, 1026, 1046, 1106, 1144, 1170, 1176, 1186, 1188, 1224, 1244, 1260, 1320, 1350, 1356, 1366
Offset: 1

Views

Author

Janos A. Csirik, Apr 21 2000

Keywords

Comments

"Looking further in the list of integers not of the form g0(N), we do eventually find some odd values, the first one occurring at the 3885th position. There are four such up to 10^5 (out of 9035 total missed values), namely 49267, 74135, 94091, 96463." (see Csirik link) - Gheorghe Coserea, May 21 2016.
a(1534734) = 9999996. - Gheorghe Coserea, May 23 2016

Crossrefs

Programs

  • Mathematica
    a1617[n_] := a1617[n] = If[n < 1, 0, 1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, Divisors[n]}] - Count[(#^2 - # + 1)/n & /@ Range[n], ?IntegerQ]/3 - Count[(#^2+1)/n & /@ Range[n], ?IntegerQ]/4];
    seq[n_] := Module[{inv, bnd}, inv[_] = -1; bnd = 12 n + 18 Floor[Sqrt[n]] + 100; For[k = 1, k <= bnd, k++, g = a1617[k]; If[g <= n && inv[g+1] == -1, inv[g+1] = k]]; (Position[Array[inv, n+1], -1] // Flatten)-1];
    seq[1000] (* Jean-François Alcover, Nov 20 2018, after Gheorghe Coserea and Michael Somos in A001617 *)
  • PARI
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k,1]+1)),
         h = prod(k=1, fsz, f[k,1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k,1]^(f[k,2]\2) + f[k,1]^((f[k,2]-1)\2));
    };
    A001617(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    scan(n) = {
      my(inv = vector(n+1,g,-1), bnd = 12*n + 18*sqrtint(n) + 100, g);
      for (k = 1, bnd, g = A001617(k);
           if (g <= n && inv[g+1] == -1, inv[g+1] = k));
      apply(x->(x-1), Vec(select(x->x==-1, inv, 1)))
    };
    scan(1367)  \\ Gheorghe Coserea, May 21 2016

A091403 Numbers n such that genus of group Gamma_0(n) is 1.

Original entry on oeis.org

11, 14, 15, 17, 19, 20, 21, 24, 27, 32, 36, 49
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

Comments

I assume it is known that there are no further terms? A reference for this would be nice.
Available conductors for modular elliptic curves genus 1. [From Artur Jasinski, Jun 24 2010]

References

  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 103.
  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see Prop. 1.40 and 1.43.

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    a86[n_] := a86[n] = Product[{p, e} = pe; Which[p == 1 || p == 3 && e == 1, 1, p == 3 && e > 1, 0, Mod[p, 3] == 1, 2, Mod[p, 3] == 2, 0, True, a86[p^e]], {pe, FactorInteger[n]}];
    a1615[n_] := n Sum[MoebiusMu[d]^2/d, {d, Divisors[n]}];
    a1616[n_] := Sum[EulerPhi[GCD[ d, n/d]], {d, Divisors[n]}];
    a1617[n_] := 1 + a1615[n]/12 - a89[n]/4 - a86[n]/3 - a1616[n]/2;
    Position[Array[a1617, 100], 1] // Flatten (* Jean-François Alcover, Oct 18 2018 *)

Formula

Numbers n such that A001617(n) = 1.

A054728 a(n) is the smallest level N such that genus of modular curve X_0(N) is n (or -1 if no such curve exists).

Original entry on oeis.org

1, 11, 22, 30, 38, 42, 58, 60, 74, 66, 86, 78, 106, 105, 118, 102, 134, 114, 223, 132, 166, 138, 188, 156, 202, 168, 214, 174, 236, 186, 359, 204, 262, 230, 278, 222, 298, 240, 314, 246, 326, 210, 346, 270, 358, 282, 557, 306, 394, 312, 412, 318
Offset: 0

Views

Author

Janos A. Csirik, Apr 21 2000

Keywords

Comments

a(150) = -1, a(n) > 0 for 0<=n<=149.
a(9999988) = 119999861 is the largest value in the first 1+10^7 terms of the sequence. - Gheorghe Coserea, May 24 2016

References

  • J. A. Csirik, The genus of X_0(N) is not 150, preprint, 2000.

Crossrefs

Programs

  • Mathematica
    a1617[n_] := If[n<1, 0, 1+Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, Divisors[n]}] - Count[(#^2 - # + 1)/n& /@ Range[n], ?IntegerQ]/3 - Count[(#^2+1)/n& /@ Range[n], ?IntegerQ]/4];
    seq[n_] := Module[{inv, bnd}, inv = Table[-1, {n+1}]; bnd = 12n + 18 Floor[Sqrt[n]] + 100; For[k = 1, k <= bnd, k++, g = a1617[k]; If[g <= n && inv[[g+1]] == -1, inv[[g+1]] = k]]; inv];
    seq[51] (* Jean-François Alcover, Nov 20 2018, after Gheorghe Coserea and Michael Somos in A001617 *)
  • PARI
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k,1]+1)),
         h = prod(k=1, fsz, f[k,1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k,1]^(f[k,2]\2) + f[k,1]^((f[k,2]-1)\2));
    };
    A001617(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    seq(n) = {
      my(inv = vector(n+1,g,-1), bnd = 12*n + 18*sqrtint(n) + 100, g);
      for (k = 1, bnd, g = A001617(k);
           if (g <= n && inv[g+1] == -1, inv[g+1] = k));
      return(inv);
    };
    seq(51)  \\ Gheorghe Coserea, May 21 2016

Formula

A001617(a(A001617(n))) = A001617(n) and a(A054729(n)) = -1 for all n>=1. - Gheorghe Coserea, May 22 2016

A091404 Numbers n such that genus of group Gamma_0(n) is 2.

Original entry on oeis.org

22, 23, 26, 28, 29, 31, 37, 50
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

Comments

I assume it is known that there are no further terms? A reference for this would be nice.

References

  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 103.
  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see Prop. 1.40 and 1.43.

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    a86[n_] := a86[n] = Product[{p, e} = pe; Which[p == 1 || p == 3 && e == 1, 1, p == 3 && e > 1, 0, Mod[p, 3] == 1, 2, Mod[p, 3] == 2, 0, True, a86[p^e]], {pe, FactorInteger[n]}];
    a1615[n_] := n Sum[MoebiusMu[d]^2/d, {d, Divisors[n]}];
    a1616[n_] := Sum[EulerPhi[GCD[d, n/d]], {d, Divisors[n]}];
    a1617[n_] := 1 + a1615[n]/12 - a89[n]/4 - a86[n]/3 - a1616[n]/2;
    Position[Array[a1617, 100], 2] // Flatten (* Jean-François Alcover, Oct 19 2018 *)

Formula

Numbers n such that A001617(n) = 2.

A127788 Dimension of the space of newforms of weight 2 and level n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 2, 1, 1, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 1, 1, 1, 4, 1, 1, 2, 3, 1, 4, 2, 3, 2, 3, 2, 5, 0, 4, 3, 3, 1, 5, 3, 5, 2, 3, 1, 6, 1, 5, 4, 3, 1, 5, 1, 6, 2, 2, 3, 7, 2, 5, 4, 5, 3, 7, 3, 7, 2, 5, 3, 7, 2, 7, 3, 4, 1, 8, 3
Offset: 1

Views

Author

Steven Finch, Apr 04 2007

Keywords

Comments

"Newform" is meant in the sense of Atkin-Lehner, that is, a primitive Hecke eigenform relative to the subgroup Gamma_0(n).

Examples

			a(p) = A001617(p) for any prime p.
G.f. = x^11 + x^14 + x^15 + x^17 + x^19 + x^20 + x^21 + 2*x^23 + x^24 + ...
		

References

  • H. Cohen, Number Theory. Vol. II. Analytic and Modern Tools. Springer, 2007, pp. 496-497.
  • Toshitsune Miyake, Modular Forms, Springer-Verlag, 1989. See Table A.

Crossrefs

Programs

  • Maple
    seq( g0star(2,N),N=1..80); # using the source in A063195 - R. J. Mathar, Jul 15 2015
  • Mathematica
    A001617[n_] := If[n < 1, 0, 1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, Divisors@n}] - Count[(#^2 - # + 1)/n & /@ Range[n], ?IntegerQ]/3 - Count[(#^2 + 1)/n & /@ Range[n], ?IntegerQ]/4]; a[n_ /; n < 10] = 0; a[n_] := a[n] =  A001617[n] - Sum[a[m]*DivisorSigma[0, n/m], {m, Divisors[n][[2 ;; -2]]}]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, Sep 07 2015, A001617 code due to Michael Somos *)
  • PARI
    {a(n) = my(v = [1, 3, 4, 6], A, p, e); if( n<1, 0, A = factor(n); for( k=1, matsize(A)[1], [p, e] = A[k,]; v[1] *= if( e==1, p-1, e==2, p^2-p-1, p^(e-3) * (p+1) * (p-1)^2); v[2] *= if( p==2, (e==3) - (e<3), e==1, kronecker(-4, p) - 1, e==2, -kronecker(-4, p)); v[3] *= if( p==3, (e==3) - (e<3), e==1, kronecker(-3, p) - 1, e==2, -kronecker(-3, p)); v[4] *= if( e%2, 0, e==2, p-2, p^(e/2-2) * (p-1)^2)); moebius(n) + (v[1] - v[2] - v[3] - v[4]) / 12 )}; /* Michael Somos, Jun 06 2015 */

Formula

a(n) = A001617(n) - sum a(m)*d(n/m), where the summation is over all divisors 1 < m < n of n and d is the divisor function.

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
Showing 1-10 of 20 results. Next