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.
%I A316553 #23 Dec 07 2021 11:08:46 %S A316553 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, %T A316553 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, %U A316553 7,3,15,3,15,1,15,3,15,1,31,1,7,3,15,3,15,1 %N A316553 Number of elements of order 2 in the group SL(2, Z(n)). %C A316553 Equivalently, the number of cyclic subgroups of the group SL(2, Z(n)) having order 2, counting conjugates as distinct. %H A316553 Antti Karttunen, <a href="/A316553/b316553.txt">Table of n, a(n) for n = 1..1023</a> %F A316553 Conjecture: a(n) = 2^(omega(n) + min(3, valuation(n, 2))) - 1. %F A316553 From _Robert Israel_, Jun 15 2020: (Start) %F A316553 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. %F A316553 If m and n are coprime, a(m*n) = a(m)*a(n)+a(m)+a(n) (i.e. a(n)+1 is multiplicative). %F A316553 If n > 1 is in A061345, a(n)=1. (End) %e A316553 Case n=2: the three 2 X 2 matrices on Z(2) having determinant 1 and order 2 are: %e A316553 [ 0 1 ] [ 1 0 ] [ 1 1 ] %e A316553 [ 1 0 ] [ 1 1 ] [ 0 1 ] %o A316553 (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))); %o A316553 (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} %o A316553 (PARI) %o A316553 memoA316553 = Map(); \\ Only values at 2^k are actually collected here. %o A316553 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)))); %o A316553 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 %Y A316553 Column 2 of A316564. %Y A316553 Cf. A174275, A316537. %Y A316553 Cf. A061345. %K A316553 nonn %O A316553 1,2 %A A316553 _Andrew Howroyd_, Jul 06 2018