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.

A000252 Number of invertible 2 X 2 matrices mod n.

Original entry on oeis.org

1, 6, 48, 96, 480, 288, 2016, 1536, 3888, 2880, 13200, 4608, 26208, 12096, 23040, 24576, 78336, 23328, 123120, 46080, 96768, 79200, 267168, 73728, 300000, 157248, 314928, 193536, 682080, 138240, 892800, 393216, 633600, 470016, 967680, 373248, 1822176, 738720
Offset: 1

Views

Author

Keywords

Comments

For a prime p, a(p) = (p^2 - 1)*(p^2 - p) (this is the order of GL(2,p)). More generally a(n) is multiplicative: if the canonical factorization of n is the Product_{i=1..k} (p_i)^(e_i), then a(n) = Product_{i=1..k} (((p_i)^(2*e_i) - (p_i)^(2*e_i - 2)) * ((p_i)^(2*e_i) - (p_i)^(2*e_i - 1))). - Brian Wallace (wallacebrianedward(AT)yahoo.co.uk), Apr 05 2001, Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 18 2001
a(n) is the order of the automorphism group of the group C_n X C_n, where C_n is the cyclic group of order n. - Laszlo Toth, Dec 06 2011
Order of the group GL(2,Z_n). For n > 2, a(n) is divisible by 48. - Jianing Song, Jul 08 2018

Crossrefs

The order of GL_2(K) for a finite field K is in sequence A059238.
Row n=2 of A316622.
Row sums of A316566.
Cf. A064767 (GL(3,Z_n)), A305186 (GL(4,Z_n)).
Cf. A000056 (SL(2,Z_n)), A011785 (SL(3,Z_n)), A011786 (SL(4,Z_n)).
Cf. A227499.

Programs

  • Mathematica
    Table[n*EulerPhi[n]*Sum[d^2 MoebiusMu[n/d], {d, Divisors[n]}], {n, 21}] (* Jean-François Alcover, Apr 04 2011, after Vladeta Jovovic *)
  • PARI
    a(n)=my(f=factor(n)[,1]); n^4*prod(i=1,#f, (1-1/f[i]^2)*(1-1/f[i])) \\ Charles R Greathouse IV, Feb 06 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A000252(n): return prod(p**((e<<2)-3)*(p*(p*(p-1)-1)+1) for p,e in factorint(n).items()) # Chai Wah Wu, Mar 04 2025

Formula

a(n) = n^4*Product_{primes p dividing n} (1 - 1/p^2)*(1 - 1/p) = n^4*Product_{primes p dividing n} p^(-3)*(p^2 - 1)*(p - 1). - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 18 2001
Multiplicative with a(p^e) = (p - 1)^2*(p + 1)*p^(4e-3). - David W. Wilson, Aug 01 2001
a(n) = A000056(n)*phi(n), where phi is Euler totient function (cf. A000010). - Vladeta Jovovic, Oct 30 2001
Dirichlet g.f.: zeta(s - 4)*Product_{p prime} (1 - p^(1 - s)*(p^2 + p - 1)). - Álvar Ibeas, Nov 28 2017
a(n) = A227499(n) for odd n; (3/4)*A227499(n) for even n. - Jianing Song, Jul 08 2018
Sum_{k=1..n} a(k) ~ c * n^5 / 5, where c = A330523 = Product_{primes p} (1 - 1/p^2 - 1/p^3 + 1/p^4) = 0.5358961538283379998085... - Vaclav Kotesovec, Aug 20 2021
Sum_{n>=1} 1/a(n) = (Pi^8/3240) * Product_{p prime} (1 - 2/p^2 + 1/p^4 + 1/p^5 + 2/p^6 - 1/p^8) = 1.2059016071... . - Amiram Eldar, Dec 03 2022

Extensions

More terms from David W. Wilson, Jul 21 2001