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-3 of 3 results.

A000056 Order of the group SL(2,Z_n).

Original entry on oeis.org

1, 6, 24, 48, 120, 144, 336, 384, 648, 720, 1320, 1152, 2184, 2016, 2880, 3072, 4896, 3888, 6840, 5760, 8064, 7920, 12144, 9216, 15000, 13104, 17496, 16128, 24360, 17280, 29760, 24576, 31680, 29376, 40320, 31104, 50616, 41040, 52416, 46080, 68880, 48384, 79464
Offset: 1

Views

Author

Keywords

Comments

The number of equivalence classes of matrices modulo n of integer matrices with determinant 1 modulo n. - Michael Somos, Mar 20 2004
24 | a(n) if n > 2. - Michael Somos, Nov 15 2011
A divisibility sequence, that is, a(n) divides a(n*m) for all positive integers n and m. - Michael Somos, Jan 01 2017
The group SL(2,Z_2) is isomorphic to the symmetric group S_3. - Bernard Schott, Mar 15 2020
a(n) = [SL_2(Z) : Gamma(n)], index of the principal congruence subgroup of the special linear group over integers. - Andrey Zabolotskiy, Feb 14 2025

Examples

			G.f. = x + 6*x^2 + 24*x^3 + 48*x^4 + 120*x^5 + 144*x^6 + 336*x^7 +384*x^8 + ...
a(2) = 6 because [0, 1; 1, 0], [0, 1; 1, 1], [1, 0; 0, 1], [1, 0; 1, 1], [1, 1; 0, 1], [1, 1; 1, 0] are the six matrices modulo 2 with determinant 1 modulo 2.
		

References

  • T. M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Springer-Verlag, 1990, page 46.
  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 75.

Crossrefs

Cf. A001766.
Row n=2 of A316623.
Row sums of A316564.
Cf. A000252 (GL(2,Z_n)), A064767 (GL(3,Z_n)), A305186 (GL(4,Z_n)).
Cf. A011785 (SL(3,Z_n)), A011786 (SL(4,Z_n)).
Cf. A007434 ([SL_2(Z) : Gamma_1(n)]), A001615 ([SL_2(Z) : Gamma_0(n)]).

Programs

  • Maple
    proc(n) local b,d: b := n^3: for d from 1 to n do if irem(n,d) = 0 and isprime(d) then b := b*(1-d^(-2)): fi: od: RETURN(b): end:
  • Mathematica
    (* From Olivier Gérard, Aug 15 1997: (Start) *)
    Table[ Fold[ If[ Mod[ n, #2 ]==0 && PrimeQ[ #2 ], #1*(1-1/#2^2), #1 ]&, n^3, Range[ n ] ], {n, 1, 35} ]
    Table[ n^3 Times@@(1-1/Select[ Range[ 1, n ], (Mod[ n, #1 ]==0&&PrimeQ[ #1 ])& ]^2), {n, 1, 35} ]  (* End *)
    a[ n_] := If[ n<1, 0, n Sum[ d^2 MoebiusMu[ n/d ], {d, Divisors @ n}]]; (* Michael Somos, Nov 15 2011 *)
    Table[ n DirichletConvolve[ MoebiusMu[m], m^2, m, n], {n, 1, 35}] (* Li Han, Mar 15 2020 *)
    a[n_] := #.RotateLeft[#] & @ Sort[Mod[ Outer[Times, Range[n], Range[n]], n] // Flatten // Tally][[;; , 2]]
    Table[a[n], {n, 1, 35}] (* Li Han, Mar 15 2020 *)
  • PARI
    {a(n) = if( n<1, 0, n * sumdiv(n, d, d^2 * moebius(n / d)))}; /* Michael Somos, Mar 05 2008 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A000056(n): return prod((p+1)*(p-1)*p**(3*e-2) for p,e in factorint(n).items()) # Chai Wah Wu, Mar 04 2025

Formula

Multiplicative with a(p^e) = (p^2 - 1)*p^(3e-2). - David W. Wilson, Aug 01 2001
a(n) = A000252(n)/phi(n), where phi is Euler totient function (cf. A000010). - Vladeta Jovovic, Oct 30 2001
a(n) = n*Sum_{d|n} d^2*mu(n/d) = n*A007434(n) where A007434 is the Jordan function J_2(n). - Benoit Cloitre, May 03 2003
a(n) = A007434(n^2)/n. - Enrique Pérez Herrero, Sep 14 2010
a(n) = A007434(n^3)/n^3. - Enrique Pérez Herrero, Dec 19 2010
Dirichlet g.f. zeta(s-3)/zeta(s-1). - R. J. Mathar, Feb 27 2011
A046970(n) divides a(n). - R. J. Mathar, Mar 30 2011
Sum_{k=1..n} a(k) ~ n^4 / (4*Zeta(3)). - Vaclav Kotesovec, Jan 30 2019
Sum_{k>=1} 1/a(k) = Product_{primes p} (1 + p^2 / ((p-1)^2 * (p+1) * (p^2 + p + 1))) = 1.258448350408311046314826069717731136828991478925039589864338603650639811... - Vaclav Kotesovec, Sep 19 2020

Extensions

More terms from Vaclav Kotesovec, Sep 19 2020

A000114 Number of cusps of principal congruence subgroup GAMMA^{hat}(n).

Original entry on oeis.org

3, 4, 6, 12, 12, 24, 24, 36, 36, 60, 48, 84, 72, 96, 96, 144, 108, 180, 144, 192, 180, 264, 192, 300, 252, 324, 288, 420, 288, 480, 384, 480, 432, 576, 432, 684, 540, 672, 576, 840, 576, 924, 720, 864, 792, 1104, 768, 1176, 900, 1152, 1008, 1404, 972, 1440
Offset: 2

Views

Author

Keywords

References

  • Robert A. Rankin, Modular Forms and Functions, Cambridge 1977, p. 62.

Crossrefs

Programs

  • Maple
    A000114 := proc(n) local b,d: if n = 2 then RETURN(3); else b := n^2/2; for d from 1 to n do if irem(n,d) = 0 and isprime(d) then b := b*(1-d^(-2)); fi; od; RETURN(b); fi: end:
  • Mathematica
    a[n_] := If[n == 2, 3, b = n^2/2; For[d = 1, d <= n, d++, If[Mod[n, d] == 0 && PrimeQ[d], b = b*(1-d^-2)]]; b]; Table[a[n], {n, 2, 50}] (* Jean-François Alcover, Feb 04 2016, adapted from Maple *)
  • PARI
    a(n) = if (n==2, 3, my(f=factor(n)); prod(k=1, #f~, 1-1/f[k,1]^2)*n^2/2); \\ Michel Marcus, Oct 23 2019

Formula

A001766(n) = n*a(n). - Michael Somos, Jan 29 2004
a(n) = ((n^2)/2)*Product_{p | n, p prime} (1-1/p^2), for n>=3. - Michel Marcus, Oct 23 2019
From Amiram Eldar, Jun 01 2025: (Start)
a(n) = A007434(n)/2 for n >= 3.
Sum_{k=1..n} a(k) ~ n^3 / (6*zeta(3)). (End)

A345209 Number of Petrie polygons on the regular triangular map corresponding to the principal congruence subgroup Gamma(n) of the modular group.

Original entry on oeis.org

1, 1, 3, 4, 6, 6, 21, 16, 27, 12, 66, 24, 78, 42, 36, 64, 136, 162, 190, 48, 252, 132, 253, 192, 150, 156, 243, 168, 870, 72, 496, 256, 396, 816, 252, 648, 666, 1140, 468, 384, 1722, 504, 903, 1056, 324, 1518, 3243, 1536, 1029, 300, 816, 624, 1378, 1458, 3960, 1344, 1140, 1740, 1770, 576
Offset: 1

Views

Author

Tom Harris, Jun 10 2021

Keywords

Comments

To each principal congruence subgroup Gamma(n) of the modular group Gamma = PSL(2,Z) there corresponds a regular triangular map (it is the quotient of the Farey map by Gamma(n)). A Petrie polygon is a closed left-right zig-zagging path on the map. a(n) is the number of such paths.

Examples

			The regular triangular map corresponding to Gamma(3) is the tetrahedron; one can easily check by hand that there are 3 distinct closed left-right zigzag paths (Petrie polygons) along the edges of the tetrahedron, so a(3) = 3.
Similarly, there are a(4) = 4 and a(5) = 6 such paths on the octahedron and the icosahedron, the maps corresponding to Gamma(4), and Gamma(5) respectively.
The map corresponding to Gamma(7) is the Klein map on his quartic curve. There are 21 Petrie polygons on this map; Klein drew 3 of them in his 1878 paper on the quartic, and the others can be found by rotating these through 2*Pi*k/7, k=1,...,6.
		

Crossrefs

A301759 gives the lengths of the Petrie polygons on the map in question.

Programs

  • Mathematica
    b[n_] := (n^3/2) Times @@ (1-1/Select[Range[n], Mod[n, #] == 0 && PrimeQ[#]&]^2);
    c[n_] := With[{F = Fibonacci}, For[k = 1, True, k++, If[Mod[F[k], n] == 0 && (Mod[F[k+1], n] == 1 || Mod[F[k+1], n] == n-1), Return[k]]]];
    a[n_] := If[n<3, 1, b[n]/c[n]];
    Array[a, 60] (* Jean-François Alcover, Jun 11 2021 *)
    Table[((n^3/2^Boole[n > 1]) Product[1 - 1/k^2, {k, Select[Divisors[n], PrimeQ]}])/NestWhile[# + 1 &, 1, ! (Mod[Fibonacci[#], n] == 0 && With[{f = Mod[Fibonacci[# + 1], n]}, f == 1 || f == n - 1]) &], {n, 60}] (* Jan Mangaldan, Sep 12 2021 *)
  • Python
    from sympy import primefactors
    def a(n):
        # degenerate cases
        if n == 1 or n == 2:
            return 1
        # calculate index of Γ(n) in Γ
        index = n**3
        for p in primefactors(n):
            index *= (p**2 - 1)
            index //= p**2
        index //= 2
        # calculate pisano semiperiod
        sigma = 1
        a, b = 1, 1
        while (a,b) != (0,1) and (a,b) != (0, n - 1):
            a, b = b, (a + b) % n
            sigma += 1
        # number of petrie polygons = index / sigma
        return index // sigma

Formula

a(n) = A001766(n)/A301759(n), n >= 3 (Corollary 7.3 of Singerman & Strudwick)
Showing 1-3 of 3 results.