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.

A316553 Number of elements of order 2 in the group SL(2, Z(n)).

Original entry on oeis.org

0, 3, 1, 7, 1, 7, 1, 15, 1, 7, 1, 15, 1, 7, 3, 15, 1, 7, 1, 15, 3, 7, 1, 31, 1, 7, 1, 15, 1, 15, 1, 15, 3, 7, 3, 15, 1, 7, 3, 31, 1, 15, 1, 15, 3, 7, 1, 31, 1, 7, 3, 15, 1, 7, 3, 31, 3, 7, 1, 31, 1, 7, 3, 15, 3, 15, 1, 15, 3, 15, 1, 31, 1, 7, 3, 15, 3, 15, 1
Offset: 1

Views

Author

Andrew Howroyd, Jul 06 2018

Keywords

Comments

Equivalently, the number of cyclic subgroups of the group SL(2, Z(n)) having order 2, counting conjugates as distinct.

Examples

			Case n=2: the three 2 X 2 matrices on Z(2) having determinant 1 and order 2 are:
  [ 0 1 ]   [ 1 0 ]   [ 1 1 ]
  [ 1 0 ]   [ 1 1 ]   [ 0 1 ]
		

Crossrefs

Column 2 of A316564.
Cf. A061345.

Programs

  • GAP
    Concatenation([0], List([2..10], n->Sum(Filtered( ConjugacyClassesSubgroups( SL(2, Integers mod n)), x->Order( Representative(x))=2 and IsCyclic( Representative(x))), Size)));
    
  • PARI
    a(n)={my(id=matid(2)); sum(a=0, n-1, sum(b=0, n-1, sum(c=0, n-1, sum(d=0, n-1, my(M=Mod([a, b; c, d], n)); if(matdet(M)==1, M^2==id))))) - 1}
    
  • PARI
    memoA316553 = Map(); \\ Only values at 2^k are actually collected here.
    A316553slow_memoized(n) = if(1==n, 0, if((n%2)&&isprimepower(n), 1, my(id=matid(2), v); if(mapisdefined(memoA316553,n,&v), v, v = (sum(a=0, n-1, sum(b=0, n-1, sum(c=0, n-1, sum(d=0, n-1, my(M=Mod([a, b; c, d], n)); if(matdet(M)==1, M^2==id))))) - 1); mapput(memoA316553,n,v); (v))));
    A316553(n) = if(1==n,0,my(f=factor(n)); -1 + prod(i=1,#f~,1+A316553slow_memoized(f[i,1]^f[i,2]))); \\ (Based on Robert Israel's multiplicativity rule) - Antti Karttunen, Dec 05 2021

Formula

Conjecture: a(n) = 2^(omega(n) + min(3, valuation(n, 2))) - 1.
From Robert Israel, Jun 15 2020: (Start)
Number of solutions mod n, other than t[1]=t[4]=1,t[2]=t[3]=0, of the equations t[2]*(t[1] + t[4])=0, t[3]*(t[1] + t[4])=0, t[1]^2 + t[2]*t[3] = 1, t[2]*t[3] + t[4]^2 = 1, t[1]*t[4] - t[2]*t[3] = 1.
If m and n are coprime, a(m*n) = a(m)*a(n)+a(m)+a(n) (i.e. a(n)+1 is multiplicative).
If n > 1 is in A061345, a(n)=1. (End)