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.

Previous Showing 11-20 of 24 results. Next

A054521 Triangle read by rows: T(n,k) = 1 if gcd(n, k) = 1, T(n,k) = 0 otherwise (n >= 1, 1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

Row sums = phi(n), A000010: (1, 1, 2, 2, 4, 2, 6, ...). - Gary W. Adamson, May 20 2007
Characteristic function of A169581: a(A169581(n)) = 1; a(A169582(n)) = 0. - Reinhard Zumkeller, Dec 02 2009
The function T(n,k) = T(k,n) is defined for k > n but only the values for 1 <= k <= n as a triangular array are listed here.
T(n,k) = |K(n-k|k)| where K(i|j) is the Kronecker symbol. - Peter Luschny, Aug 05 2012
Twice the sum over the antidiagonals, starting with entry T(n-1,1), for n >= 3, is the same as the row n sum (i.e., phi(n): 2*Sum_{k=1..floor(n/2)} T(n-k,k) = phi(n), n >= 3). - Wolfdieter Lang, Apr 26 2013
The number of zeros in the n-th row of the triangle is cototient(n) = A051953(n). - Omar E. Pol, Apr 21 2017
This triangle is the j = 1 sub-triangle of A349221(n,k) = Sum_{j>=1} [k|binomial(n-1,k-1) AND gcd(n,k) = j], n >= 1, 1 <= k <= n, where [] is the Iverson bracket. - Richard L. Ollerton, Dec 14 2021

Examples

			The triangle T(n,k) begins:
  n\k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
   1:  1
   2:  1  0
   3:  1  1  0
   4:  1  0  1  0
   5:  1  1  1  1  0
   6:  1  0  0  0  1  0
   7:  1  1  1  1  1  1  0
   8:  1  0  1  0  1  0  1  0
   9:  1  1  0  1  1  0  1  1  0
  10:  1  0  1  0  0  0  1  0  1  0
  11:  1  1  1  1  1  1  1  1  1  1  0
  12:  1  0  0  0  1  0  1  0  0  0  1  0
  13:  1  1  1  1  1  1  1  1  1  1  1  1  0
  14:  1  0  1  0  1  0  0  0  1  0  1  0  1  0
  15:  1  1  0  1  0  0  1  1  0  0  1  0  1  1  0
  ... (Reformatted by _Wolfdieter Lang_, Apr 26 2013)
Sums over antidiagonals: n = 3: 2*T(2,1) = 2 = T(3,1) + T(3,2) = phi(3). n = 4: 2*(T(3,1) + T(2,2)) = 2 = phi(4), etc. - _Wolfdieter Lang_, Apr 26 2013
		

Crossrefs

Programs

  • Haskell
    a054521 n k = a054521_tabl !! (n-1) !! (k-1)
    a054521_row n = a054521_tabl !! (n-1)
    a054521_tabl = map (map a063524) a050873_tabl
    a054521_list = concat a054521_tabl
    -- Reinhard Zumkeller, Sep 03 2015
  • Maple
    A054521_row := n -> seq(abs(numtheory[jacobi](n-k,k)),k=1..n);
    for n from 1 to 13 do A054521_row(n) od; # Peter Luschny, Aug 05 2012
  • Mathematica
    T[ n_, k_] := Boole[ n>0 && k>0 && GCD[ n, k] == 1] (* Michael Somos, Jul 17 2011 *)
    T[ n_, k_] := If[ n<1 || k<1, 0, If[ k>n, T[ k, n], If[ k==1, 1, If[ n>k, T[ k, Mod[ n, k, 1]], 0]]]] (* Michael Somos, Jul 17 2011 *)
  • PARI
    {T(n, k) = n>0 && k>0 && gcd(n, k)==1} /* Michael Somos, Jul 17 2011 */
    
  • Sage
    def A054521_row(n): return [abs(kronecker_symbol(n-k,k)) for k in (1..n)]
    for n in (1..13): print(A054521_row(n)) # Peter Luschny, Aug 05 2012
    

Formula

T(n,k) = A063524(A050873(n,k)). - Reinhard Zumkeller, Dec 02 2009, corrected Sep 03 2015
T(n,k) = A054431(n,k) = A054431(k,n). - R. J. Mathar, Jul 21 2016

A057731 Irregular triangle read by rows: T(n,k) = number of elements of order k in symmetric group S_n, for n >= 1, 1 <= k <= g(n), where g(n) = A000793(n) is Landau's function.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 9, 8, 6, 1, 25, 20, 30, 24, 20, 1, 75, 80, 180, 144, 240, 1, 231, 350, 840, 504, 1470, 720, 0, 0, 504, 0, 420, 1, 763, 1232, 5460, 1344, 10640, 5760, 5040, 0, 4032, 0, 3360, 0, 0, 2688, 1, 2619, 5768, 30996, 3024, 83160, 25920, 45360, 40320, 27216, 0, 30240, 0, 25920, 24192, 0, 0, 0, 0, 18144
Offset: 1

Views

Author

Roger Cuculière, Oct 29 2000

Keywords

Comments

Every row for n >= 7 contains zeros. Landau's function quickly becomes > 2*n, and there is always a prime between n and 2*n. T(n,p) = 0 for such a prime p. - Franklin T. Adams-Watters, Oct 25 2011

Examples

			Triangle begins:
  1;
  1,   1;
  1,   3,   2;
  1,   9,   8,   6;
  1,  25,  20,  30,  24,   20;
  1,  75,  80, 180, 144,  240;
  1, 231, 350, 840, 504, 1470, 720, 0, 0, 504, 0, 420;
  ...
		

References

  • Herbert S. Wilf, "The asymptotics of e^P(z) and the number of elements of each order in S_n." Bull. Amer. Math. Soc., 15.2 (1986), 225-232.

Crossrefs

Cf. A000793, also A054522 (for cyclic group), A057740 (alternating group), A057741 (dihedral group).
Rows sums give A000142, last elements of rows give A074859, columns k=2, 3, 5, 7, 11 give A001189, A001471, A059593, A153760, A153761. - Alois P. Heinz, Feb 16 2013
Main diagonal gives A074351.
Cf. A222029.

Programs

  • Magma
    {* Order(g) : g in Sym(6) *};
    
  • Maple
    with(group):
    for n from 1 do
        f := [seq(0,i=1..n!)] ;
        mknown := 0 ;
        # loop through the permutations of n
        Sn := combinat[permute](n) ;
        for per in Sn do
            # write this permutation in cycle notation
            gen := convert(per,disjcyc) ;
            # compute the list of lengths of the cycles, then the lcm of these
            cty := [seq(nops(op(i,gen)),i=1..nops(gen))] ;
            if cty <> [] then
                lcty := lcm(op(cty)) ;
            else
                lcty := 1 ;
            end if;
            f := subsop(lcty = op(lcty,f)+1,f) ;
            mknown := max(mknown,lcty) ;
        end do:
        ff := add(el,el=f) ;
        print(seq(f[i],i=1..mknown)) ;
    end do: # R. J. Mathar, May 26 2014
    # second Maple program:
    b:= proc(n, g) option remember; `if`(n=0, x^g, add((j-1)!
          *b(n-j, ilcm(g, j))*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 1)):
    seq(T(n), n=1..12);  # Alois P. Heinz, Jul 11 2017
  • Mathematica
    <Jean-François Alcover, Aug 31 2016 *)
    b[n_, g_] := b[n, g] = If[n == 0, x^g, Sum[(j-1)!*b[n-j, LCM[g, j]]* Binomial[n-1, j-1], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][ b[n, 1]];
    Array[T, 12] // Flatten (* Jean-François Alcover, May 03 2019, after Alois P. Heinz *)
  • PARI
    T(n,k)={n!*polcoeff(sumdiv(k, i, moebius(k/i)*exp(sumdiv(i, j, x^j/j) + O(x*x^n))), n)} \\ Andrew Howroyd, Jul 02 2018

Formula

Sum_{k=1..A000793(n)} k*T(n,k) = A060014(n); A000793 = Landau's function.

Extensions

More terms from N. J. A. Sloane, Nov 01 2000

A057740 Irregular triangle read by rows: T(n,k) is the number of elements of alternating group A_n having order k, for n >= 1, 1 <= k <= A051593(n).

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 3, 8, 1, 15, 20, 0, 24, 1, 45, 80, 90, 144, 1, 105, 350, 630, 504, 210, 720, 1, 315, 1232, 3780, 1344, 5040, 5760, 0, 0, 0, 0, 0, 0, 0, 2688, 1, 1323, 5768, 18900, 3024, 37800, 25920, 0, 40320, 9072, 0, 15120, 0, 0, 24192
Offset: 1

Views

Author

Roger Cuculière, Oct 29 2000

Keywords

Examples

			Triangle begins:
  1;
  1;
  1,    0,    2;
  1,    3,    8;
  1,   15,   20,     0,   24;
  1,   45,   80,    90,  144;
  1,  105,  350,   630,  504,   210,   720;
  1,  315, 1232,  3780, 1344,  5040,  5760, 0,     0,    0, 0,     0, 0, 0,  2688;
  1, 1323, 5768, 18900, 3024, 37800, 25920, 0, 40320, 9072, 0, 15120, 0, 0, 24192;
...
		

References

  • J. H. Conway, R. T. Curtis, S. P. Norton, R. A. Parker and R. A. Wilson, ATLAS of Finite Groups. Oxford Univ. Press, 1985 [for best online version see https://oeis.org/wiki/Welcome#Links_to_Other_Sites].

Crossrefs

Programs

  • Magma
    {* Order(g) : g in Alt(6) *};
  • Mathematica
    row[n_] := (orders = PermutationOrder /@ GroupElements[AlternatingGroup[n] ]; Table[Count[orders, k], {k, 1, Max[orders]}]); Table[row[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Aug 31 2016 *)

Extensions

More terms from N. J. A. Sloane, Nov 01 2000
Missing zero in the row for A_9 inserted by N. J. A. Sloane, Mar 27 2015

A127466 Triangle read by rows: A054525 * A127481 as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 2, 3, 0, 6, 4, 4, 0, 8, 5, 0, 0, 0, 20, 6, 6, 12, 0, 0, 12, 7, 0, 0, 0, 0, 0, 42, 8, 8, 0, 16, 0, 0, 0, 32, 9, 0, 18, 0, 0, 0, 0, 0, 54, 10, 10, 0, 0, 40, 0, 0, 0, 0, 40
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

Mobius transform of A127481.

Examples

			First few rows of the triangle are:
1;
2, 2;
3, 0, 6;
4, 4, 0, 8;
5, 0, 0, 0, 20;
6, 6, 12, 0, 0, 12;
7, 0, 0, 0, 0, 0, 42;
8, 8, 0, 16, 0, 0, 0, 32;
...
		

Crossrefs

Programs

Formula

Sum_{k=1..n} T(n,k) = n^2.
T(n,n) = A002618(n) = n*phi(n).

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Aug 23 2007

A130212 T(k, n) = sum_(1 <= j <= k) [j | k] j mu(k / j) floor(n / k), triangle read by rows.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 4, 2, 2, 2, 5, 2, 2, 2, 4, 6, 3, 4, 2, 4, 2, 7, 3, 4, 2, 4, 2, 6, 8, 4, 4, 4, 4, 2, 6, 4, 9, 4, 6, 4, 4, 2, 6, 4, 6, 10, 5, 6, 4, 8, 2, 6, 4, 6, 4, 11, 5, 6, 4, 8, 2, 6, 4, 6, 4, 10, 12, 6, 8, 6, 8, 4, 6, 4, 6, 4, 10, 4, 13, 6, 8, 6, 8, 4, 6, 4, 6, 4, 10, 4, 12
Offset: 1

Views

Author

Gary W. Adamson, May 17 2007

Keywords

Examples

			First few rows of the triangle are:
1;
2, 1;
3, 1, 2;
4, 2, 2, 2;
5, 2, 2, 2, 4;
6, 3, 4, 2, 4, 2;
7, 3, 4, 2, 4, 2, 6;
8, 4, 4, 4, 4, 2, 6, 4;
9, 4, 6, 4, 4, 2, 6, 4, 6;
10, 5, 6, 4, 8, 2, 6, 4, 6, 4;
...
		

Crossrefs

Cf. A000010, A130211 (product with swapped matrices), A054522, A000217 (row sums).

Programs

  • Maple
    with(numtheory): A130212 := (n, k) -> add(j*mobius(k / j)*iquo(n, k), j = divisors(k)); # Peter Luschny, Oct 28 2010
  • Mathematica
    A[n_, k_] := Sum[j MoebiusMu[k/j] Floor[n/k], {j, Divisors[k]}];
    Table[A[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 14 2019 *)

Formula

A000012 * A054522 as infinite lower triangular matrices (previous name).
T(n,n) = A000010(n).

Extensions

Name replaced by new formula by Peter Luschny, Oct 28 2010
T(6,1) corrected by R. J. Mathar, Aug 06 2016

A057741 Table T(n,k) giving number of elements of order k in dihedral group D_{2n} of order 2n, n >= 1, 1<=k<=g(n), where g(n) = 2 if n=1 else g(n) = n.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 2, 1, 5, 0, 2, 1, 5, 0, 0, 4, 1, 7, 2, 0, 0, 2, 1, 7, 0, 0, 0, 0, 6, 1, 9, 0, 2, 0, 0, 0, 4, 1, 9, 2, 0, 0, 0, 0, 0, 6, 1, 11, 0, 0, 4, 0, 0, 0, 0, 4, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 10, 1, 13, 2, 2, 0, 2, 0, 0, 0, 0, 0, 4, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 1, 15, 0, 0, 0, 0, 6, 0, 0
Offset: 1

Views

Author

Roger Cuculière, Oct 29 2000

Keywords

Comments

Note that D_2 equals the cyclic group of order 2.

Examples

			1,1;
1,3;
1,3,2;
1,5,0,2;
1,5,0,0,4; ...
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_] /; k != 2 && ! Divisible[n, k] = 0; t[n_, k_] /; k != 2 && Divisible[n, k] := EulerPhi[k]; t[n_, 2] := n + 1 - Mod[n, 2]; Flatten[Table[t[n, k], {n, 1, 14}, {k, 1, If[n == 1, 2, n]}]] (* Jean-François Alcover, Jun 19 2012, from formula *)
    row[n_] := (orders = PermutationOrder /@ GroupElements[DihedralGroup[n]]; Table[Count[orders, k], {k, 1, Max[orders]}]); Table[row[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Aug 31 2016 *)

Formula

If k<>2 and k does not divide n, this number is 0; if k<>2 and k divides n, this number is phi(k), where phi is the Euler totient function; if k=2, this number is n for odd n and n+1 for even n.

Extensions

More terms from James Sellers, Oct 30 2000

A127481 Triangle T(n,k) read by rows: T(n,k) = sum_{l=k..n, l|n, k|l} l*phi(k).

Original entry on oeis.org

1, 3, 2, 4, 0, 6, 7, 6, 0, 8, 6, 0, 0, 0, 20, 12, 8, 18, 0, 0, 12, 8, 0, 0, 0, 0, 0, 42, 15, 14, 0, 24, 0, 0, 0, 32, 13, 0, 24, 0, 0, 0, 0, 0, 54, 18, 12, 0, 0, 60, 0, 0, 0, 0, 40, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 28, 24, 42, 32, 0, 36, 0, 0, 0, 0, 0, 48, 14, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Examples

			First few rows of the triangle are:
1;
3, 2;
4, 0, 6;
7, 6, 0, 8;
6, 0, 0, 0, 20,
12, 8, 18, 0, 0, 12;
8, 0, 0, 0, 0, 0, 42;
15, 14, 0, 24, 0, 0, 0, 32;
...
		

Crossrefs

Cf. A054522, A127093, A001157 (row sums), A002618, A127466.

Programs

  • Maple
    A127481 := proc(n,k)
        a :=0 ;
        for l from k to n do
            if modp(n,l) =0 and modp(l,k) =0 then
                a := a+l*numtheory[phi](k) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 06 2013

Formula

T(n,1) = A000203(n).
T(n,n) = A002618(n).
T(n,k) =sum_{l=k..n} A127093(n,l) * A054522(l,k), the matrix product of the infinite lower triangular matrices.

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

A345628 Irregular triangle T(n,k) read by rows of the number of elements of order k in the dicyclic group Dic(n) for n>=2.

Original entry on oeis.org

1, 1, 0, 6, 1, 1, 2, 6, 0, 2, 1, 1, 0, 10, 0, 0, 0, 4, 1, 1, 0, 10, 4, 0, 0, 0, 0, 4, 1, 1, 2, 14, 0, 2, 0, 0, 0, 0, 0, 4, 1, 1, 0, 14, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 1, 1, 0, 18, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 1, 1, 2, 18, 0, 2, 0, 0, 6, 0, 0, 0, 0, 0, 0
Offset: 2

Views

Author

Sean A. Irvine, Jun 22 2021

Keywords

Comments

Dic(1) is omitted since it is degenerate.
Row n has 2*n entries (k=1..2*n).

Examples

			Triangle begins:
  1, 1, 0,  6;
  1, 1, 2,  6, 0, 2;
  1, 1, 0,  1, 0, 0, 0, 4;
  1, 1, 0, 10, 4, 0, 0, 0, 0, 4;
  ...
		

Crossrefs

A127472 Triangle T(n,k) = Sum_{j=k..n, j|n, k|j} phi(j) read by rows, 1<=k<=n.

Original entry on oeis.org

1, 2, 1, 3, 0, 2, 4, 3, 0, 2, 5, 0, 0, 0, 4, 6, 3, 4, 0, 0, 2, 7, 0, 0, 0, 0, 0, 6, 8, 7, 0, 6, 0, 0, 0, 4, 9, 0, 8, 0, 0, 0, 0, 0, 6, 10, 5, 0, 0, 8, 0, 0, 0, 0, 4, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 12, 9, 8, 6, 0, 6, 0, 0, 0, 0, 0, 4, 13
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

Defined by the matrix product A054522 * A051731.

Examples

			First few rows of the triangle are;
.1;
.2, 1;
.3, 0, 2;
.4, 3, 0, 2;
.5, 0, 0, 0, 4;
.6, 3, 4, 0, 0, 2;
.7, 0, 0, 0, 0, 0, 6;
.8, 7, 0, 6, 0, 0, 0, 4;
....
		

Crossrefs

Cf. A054522, A051731, A062949 (row sums), A000010 (diagonal n=k), A127471 (swapped matrix product).

Programs

  • Maple
    A127472 := proc(n,k)
            a := 0 ;
            for j from k to n do
                    if (n mod j = 0 ) and (j mod k =0 ) then
                            a := a+numtheory[phi](j) ;
                    end if;
            end do;
            a ;
    end proc:
    seq(seq(A127472(n,k),k=1..n),n=1..14) ; # R. J. Mathar, Nov 11 2011

Formula

T(n,k) = Sum_{j=k..n} A054522(n,j) * A051731(j,k), 1<=k<=n.
Previous Showing 11-20 of 24 results. Next