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.

A066947 Number of elements of order 2 in GL(2,Z_n).

This page as a plain text file.
%I A066947 #22 Jul 08 2018 19:59:57
%S A066947 3,13,27,31,55,57,175,109,127,133,391,183,231,447,607,307,439,381,895,
%T A066947 811,535,553,2463,751,735,973,1623,871,1791,993,2335,1875,1231,1855,
%U A066947 3079,1407,1527,2575,5631,1723,3247,1893,3751,3519,2215,2257,8511,2745
%N A066947 Number of elements of order 2 in GL(2,Z_n).
%H A066947 Charles R Greathouse IV, <a href="/A066947/b066947.txt">Table of n, a(n) for n = 2..10000</a>
%H A066947 Alec Mihailovs, <a href="http://www.shepherd.edu/mathweb/solution16.html">Problem 16 Solution</a>
%H A066947 Alec Mihailovs, <a href="http://webpages.shepherd.edu/amihailo/AbstractAlgebra.html">Abstract Algebra with Maple</a>
%H A066947 Alec Mihailovs, <a href="http://www.mapleapps.com/powertools/abstractalgebra/html/Chapter5.html">Chapter 5. Cyclic Groups</a>
%F A066947 If n = 2^m*p^a...q^b where p, ..., q are the odd prime divisors of n, then a(n) = c(m)*(p^{2a} + p^{2a-1} + 2)...(q^{2b} + q^{2b-1} + 2) - 1 where c(0) = 1, c(1) = 4, c(2) = 28 and c(m) = 9*4^{m-1} + 32 for m > 2. The integer function f(n) = a(n)+1 is multiplicative, i.e., f(m*n)=f(m)*f(n) for coprime m and n. - Alec Mihailovs (alec(AT)mihailovs.com), Mar 24 2002
%F A066947 a(n) = A066907(n) - 1. - _Andrew Howroyd_, Jul 08 2018
%F A066947 a(n) = A227867(n) - 1 for odd n. - _Jianing Song_, Jul 08 2018
%e A066947 a(3000) = (a(8)+1)*(a(3)+1)*(a(125)+1)-1 = (9*4^2 + 2)*(3^2 + 3 + 2)*(5^6 + 5^5 + 2) - 1 = 46204927 because 3000 = 2^3*3*5^3.
%p A066947 Ord2inGL2 := proc(n::posint) local i,j,m,c; if n=1 then return 0 end if; m := ifactors(n)[2]; c := 1; j := 1; if (m[1,1]=2) then j := 2; if m[1,2]=1 then c := 4 elif m[1,2]=2 then c := 28 else c := 9*4^(m[1,2]-1)+32 end if end if; c := c*mul((m[i,1]+1)*m[i,1]^(2*m[i,2]-1)+2,i=j..nops(m))-1 end;
%t A066947 a[n_] := (c[0] = 1; c[1] = 4; c[2] = 28; c[k_] := 9*4^(k-1) + 32; fi = FactorInteger[n]; m = (s = Cases[fi, {2, _}]; If[s == {}, 0, s[[1, 2]]]); p = If[m == 0, fi, Rest[fi]]; p1 = p[[All, 1]]; p2 = p[[All, 2]]; c[m]*Times @@ (p1^(2p2) + p1^(2p2-1) + 2) - 1);
%t A066947 (* _Jean-François Alcover_, May 19 2011, after Maple prog. *)
%o A066947 (PARI) a(n)=my(o=valuation(n,2),f=factor(n>>o)); prod(i=1,#f[,1],f[i,1]^(2*f[i,2])+f[i,1]^(2*f[i,2]-1)+2)*if(o, if(o>1, if(o>2, 9*4^(o-1)+32,28),4),1)-1 \\ _Charles R Greathouse IV_, May 29 2013
%Y A066947 Column 2 of A316566.
%Y A066947 Cf. A066907, A227867.
%K A066947 nice,easy,nonn
%O A066947 2,1
%A A066947 Alec Mihailovs (alec(AT)mihailovs.com), Jan 24 2002 and Mar 24 2002