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

A252911 Irregular triangular array read by rows: T(n,k) is the number of elements in the multiplicative group of integers modulo n that have order k, n>=1, 1<=k<=A002322(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 2, 0, 0, 2, 1, 3, 1, 1, 2, 0, 0, 2, 1, 1, 0, 2, 1, 1, 0, 0, 4, 0, 0, 0, 0, 4, 1, 3, 1, 1, 2, 2, 0, 2, 0, 0, 0, 0, 0, 4, 1, 1, 2, 0, 0, 2, 1, 3, 0, 4, 1, 3, 0, 4, 1, 1, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 1, 1, 2, 0, 0, 2, 1, 1, 2, 0, 0, 2, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 6, 1, 3, 0, 4
Offset: 1

Views

Author

Geoffrey Critzer, Dec 24 2014

Keywords

Comments

Row sums are A000010.
Column 2 = A155828(n) = A060594(n) - 1.

Examples

			1;
1;
1, 1;
1, 1;
1, 1, 0, 2;
1, 1;
1, 1, 2, 0, 0, 2;
1, 3;
1, 1, 2, 0, 0, 2;
1, 1, 0, 2;
1, 1, 0, 0, 4, 0, 0, 0, 0, 4;
1, 3;
1, 1, 2, 2, 0, 2, 0, 0, 0, 0, 0, 4;
1, 1, 2, 0, 0, 2;
1, 3, 0, 4;
T(15,2)=3 because the elements 4, 11, and 14 have order 2 in the modulo multiplication group (Z/15Z)*. We observe that 4^2, 11^2, and 14^2 are congruent to 1 mod 15.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= n-> `if`(n=1, 1, (p-> seq(coeff(p, x, j), j=1..degree(p)))(
             add(`if`(igcd(n, i)>1, 0, x^order(i, n)), i=1..n-1))):
    seq(T(n), n=1..30);  # Alois P. Heinz, Dec 30 2014
  • Mathematica
    Table[Table[
       Count[Table[
         MultiplicativeOrder[a, n], {a,
          Select[Range[n], GCD[#, n] == 1 &]}], k], {k, 1,
        CarmichaelLambda[n]}], {n, 1, 20}] // Grid

A265120 Irregular array read by rows: Row n gives the number of elements in the multiplicative group mod n, (Z/nZ, *), that have order d for each divisor d of the exponent of the group.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 2, 2, 1, 1, 2, 1, 1, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 1, 1, 2, 2, 1, 3, 4, 1, 3, 4, 1, 1, 2, 4, 8, 1, 1, 2, 2, 1, 1, 2, 2, 6, 6, 1, 3, 4, 1, 3, 2, 6, 1, 1, 4, 4, 1, 1, 10, 10, 1, 7, 1, 1, 2, 4, 4, 8
Offset: 2

Views

Author

Geoffrey Critzer, Dec 01 2015

Keywords

Comments

The exponent of the multiplicative group mod n is Carmichael lambda(n) given in A002322.
The row lengths are tau(lambda(n)) = A000005(A002322(n)) = A066800(n).
The invariant factor decomposition of (Z/nZ,*) is given in A258446.
The row sums are phi(n) = A000010(n).
It appears that column 2 is A155828.

Examples

			{1}
{1, 1}
{1, 1}
{1, 1, 2}
{1, 1}
{1, 1, 2, 2}
{1, 3}
{1, 1, 2, 2}
{1, 1, 2}
{1, 1, 4, 4}
{1, 3}
{1, 1, 2, 2, 2, 4}
{1, 1, 2, 2}
{1, 3, 4}
{1, 3, 4}
{1, 1, 2, 4, 8}
{1, 1, 2, 2}
{1, 1, 2, 2, 6, 6}
{1, 3, 4}
{1, 3, 2, 6}
{1, 1, 4, 4}
{1, 1, 10, 10}
{1, 7},
{1, 1, 2, 4, 4, 8}
The row for n=21 reads: 1,3,2,6 because the multiplicative group mod 21,  (Z/21*Z,*) is isomorphic to C_6 X C_2. The exponent of this group is 6. This group contains one element of order 1, three elements of order 2, two elements of order 3, and six elements of order 6.
		

Crossrefs

Programs

  • Mathematica
    f[{p_, e_}] := {FactorInteger[p - 1][[All, 1]]^
        FactorInteger[p - 1][[All, 2]],
       FactorInteger[p^(e - 1)][[All, 1]]^
        FactorInteger[p^(e - 1)][[All, 2]]};
    fun[lst_] :=
    Module[{int, num, res},
      int = Sort /@ GatherBy[Join @@ (FactorInteger /@ lst), First];
      num = Times @@ Power @@@ (Last@# & /@ int);
      res = Flatten[Map[Power @@ # &, Most /@ int, {2}]];
      {num, res}]
    rec[lt_] :=
    First@NestWhile[{Append[#[[1]], fun[#[[2]]][[1]]],
         fun[#[[2]]][[2]]} &, {{}, lt}, Length[#[[2]]] > 0 &];
    t[list_] :=
    Table[Count[Map[PermutationOrder, GroupElements[AbelianGroup[list]]],
        d], {d, Divisors[First[list]]}];
    Map[t, Table[
       If[! IntegerQ[n/8],
        DeleteCases[rec[Flatten[Map[f, FactorInteger[n]]]], 1],
        DeleteCases[
         rec[Join[{2, 2^(FactorInteger[n][[1, 2]] - 2)},
           Flatten[Map[f, Drop[FactorInteger[n], 1]]]]], 1]], {n, 2,
        25}] /. {} -> {1}]
Showing 1-2 of 2 results.