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

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

Original entry on oeis.org

3, 13, 27, 31, 55, 57, 175, 109, 127, 133, 391, 183, 231, 447, 607, 307, 439, 381, 895, 811, 535, 553, 2463, 751, 735, 973, 1623, 871, 1791, 993, 2335, 1875, 1231, 1855, 3079, 1407, 1527, 2575, 5631, 1723, 3247, 1893, 3751, 3519, 2215, 2257, 8511, 2745
Offset: 2

Views

Author

Alec Mihailovs (alec(AT)mihailovs.com), Jan 24 2002 and Mar 24 2002

Keywords

Examples

			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.
		

Crossrefs

Column 2 of A316566.

Programs

  • Maple
    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;
  • Mathematica
    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);
    (* Jean-François Alcover, May 19 2011, after Maple prog. *)
  • 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

Formula

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
a(n) = A066907(n) - 1. - Andrew Howroyd, Jul 08 2018
a(n) = A227867(n) - 1 for odd n. - Jianing Song, Jul 08 2018

A087726 Number of elements X in the matrix ring M_2(Z_n) such that X^2 == 0 mod n.

Original entry on oeis.org

1, 4, 9, 28, 25, 36, 49, 112, 153, 100, 121, 252, 169, 196, 225, 640, 289, 612, 361, 700, 441, 484, 529, 1008, 1225, 676, 1377, 1372, 841, 900, 961, 2560, 1089, 1156, 1225, 4284, 1369, 1444, 1521, 2800, 1681, 1764, 1849, 3388, 3825, 2116, 2209, 5760, 4753, 4900, 2601, 4732
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 28 2003

Keywords

Comments

Conjecture: a(n)=n^2 if and only if n is squarefree. [Ben Branman, Mar 22 2013]
Preceding conjecture is true in the case where n is squarefree. - Eric M. Schmidt, Mar 23 2013
It appears that a(p^k) = (1+3*p^2 + 2*k*(p^2-1) + (-1)^k*(p^2-1))*p^(2*k-2)/4 for primes p. Since the sequence is multiplicative, this would imply the conjecture. - Robert Israel, Jun 10 2015
A proof of the formula for k=1 can be done easily (see pdf). - Manfred Scheucher, Jun 10 2015

Crossrefs

Programs

  • C
    #include
    #include
    int main(int argc,char** argv)
    {
      long ct = 0;
      int n = atoi(argv[1]);
      int a,b,c,d;
      for(a=0;aManfred Scheucher, Jun 09 2015 */
  • Maple
    f:= proc(n)
      local tot, S, a, mult, sa, d, ad, g, cands;
      tot:= 0;
      S:= ListTools:-Classify(t -> t^2 mod n, [$0..n-1]);
      for a in numtheory:-divisors(n) do
        mult:= numtheory:-phi(n/a);
        sa:= a^2 mod n;
        for d in S[sa] do
           g:= igcd(a+d,n);
           cands:= [seq(i*n/g, i=0..g-1)];
           tot:= tot + mult * numboccur(sa,[seq(seq(s*t,s=cands),t=cands)] mod n);
        od
      od;
      tot
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 09 2015
  • Mathematica
    a[m_] := Count[Table[Mod[MatrixPower[Partition[IntegerDigits[n, m, 4], 2], 2], m] == {{0, 0}, {0, 0}}, {n, 0, m^4 - 1}], True]; Table[a[n], {n,2,30}] (* Ben Branman, Mar 22 2013 *)

Extensions

More terms from Ben Branman, Mar 22 2013
More terms from Manfred Scheucher, Jun 09 2015

A316584 Array read by antidiagonals: T(n,k) is the number of elements x in GL(2,Z_n) with x^k == I mod n where I is the identity matrix.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 3, 14, 1, 1, 4, 9, 28, 1, 1, 1, 20, 9, 32, 1, 1, 6, 1, 64, 21, 56, 1, 1, 1, 30, 1, 184, 27, 58, 1, 1, 4, 1, 60, 25, 80, 171, 176, 1, 1, 3, 32, 1, 72, 1, 100, 33, 110, 1, 1, 4, 9, 64, 1, 180, 1, 640, 297, 128, 1, 1, 1, 14, 9, 224, 1, 846, 1, 164, 63, 134, 1
Offset: 1

Views

Author

Andrew Howroyd, Jul 07 2018

Keywords

Comments

All columns are multiplicative.
Some terms of this sequence may also be computed using a formula given by Kent Morrison (section 1.11 and 2.5 in the reference). See A053725 for a PARI implementation.

Examples

			Array begins:
======================================================
  n\k | 1   2   3    4    5    6   7    8   9   10
------+-----------------------------------------------
    1 | 1   1   1    1    1    1   1    1   1    1 ...
    2 | 1   4   3    4    1    6   1    4   3    4 ...
    3 | 1  14   9   20    1   30   1   32   9   14 ...
    4 | 1  28   9   64    1   60   1   64   9   28 ...
    5 | 1  32  21  184   25   72   1  224  21   80 ...
    6 | 1  56  27   80    1  180   1  128  27   56 ...
    7 | 1  58 171  100    1  846  49  184 171   58 ...
    8 | 1 176  33  640    1  432   1 1024  33  176 ...
    9 | 1 110 297  164    1 1566   1  272 729  110 ...
   10 | 1 128  63  736   25  432   1  896  63  320 ...
   11 | 1 134 111  244 1325  354   1  464 111 5950 ...
   12 | 1 392  81 1280    1 1800   1 2048  81  392 ...
   13 | 1 184 549 1096    1 2736 469 1408 549  184 ...
   14 | 1 232 513  400    1 5076  49  736 513  232 ...
   15 | 1 448 189 3680   25 2160   1 7168 189 1120 ...
   ...
		

Crossrefs

Column 2 is A066907.

Formula

T(n,k) = Sum_{d|k} A316566(n, d).
Conjecture: T(p,p) = p^2 for p prime.

A087785 Number of elements in GL(2,Z_n) x with x^2 == -I mod n where I is the identity matrix.

Original entry on oeis.org

1, 4, 6, 12, 32, 24, 42, 48, 54, 128, 110, 72, 184, 168, 192, 192, 308, 216, 342, 384, 252, 440, 506, 288, 752, 736, 486, 504, 872, 768, 930, 768, 660, 1232, 1344, 648, 1408, 1368, 1104, 1536, 1724, 1008, 1806, 1320, 1728, 2024, 2162, 1152, 2058, 3008, 1848
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 06 2003

Keywords

Crossrefs

Extensions

More terms from David Wasserman, Jun 17 2005
Showing 1-4 of 4 results.