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-10 of 14 results. Next

A246106 Number A(n,k) of inequivalent n X n matrices with entries from [k], where equivalence means permutations of rows or columns; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 7, 1, 0, 1, 4, 27, 36, 1, 0, 1, 5, 76, 738, 317, 1, 0, 1, 6, 175, 8240, 90492, 5624, 1, 0, 1, 7, 351, 57675, 7880456, 64796982, 251610, 1, 0, 1, 8, 637, 289716, 270656150, 79846389608, 302752867740, 33642660, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 13 2014

Keywords

Examples

			Square array A(n,k) begins:
  1, 1,    1,        1,           1,              1, ...
  0, 1,    2,        3,           4,              5, ...
  0, 1,    7,       27,          76,            175, ...
  0, 1,   36,      738,        8240,          57675, ...
  0, 1,  317,    90492,     7880456,      270656150, ...
  0, 1, 5624, 64796982, 79846389608, 20834113243925, ...
		

Crossrefs

Main diagonal gives A246107.
A028657, A242106, A353585 are related tables.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [[]],
          `if`(i<1, [], [b(n, i-1)[], seq(map(p->[p[], [i, j]],
           b(n-i*j, i-1))[], j=1..n/i)]))
        end:
    A:= proc(n, k) option remember; add(add(k^add(add(i[2]*j[2]*
          igcd(i[1], j[1]), j=t), i=s) /mul(i[1]^i[2]*i[2]!, i=s)
          /mul(i[1]^i[2]*i[2]!, i=t), t=b(n$2)), s=b(n$2))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • PARI
    A246106(n,k)=A353585(k,n,n) \\ M. F. Hasler, May 01 2022

Formula

A(n,k) = Sum_{i=0..k} C(k,i) * A256069(n,i).
A(n,k) = Sum_{p,q in P(n)} k^Sum_{i in p, j in q} gcd(i, j) / (N(p)*N(q)) where N(p) = Product_{distinct parts x in p} x^m(x)*m(x)!, m(x) = multiplicity of x in p. - M. F. Hasler, Apr 30 2022 [corrected by Anders Kaseorg, Oct 04 2024]

A242093 Number A(n,k) of inequivalent n X k binary matrices, where equivalence means permutations of rows or columns or the symbol set; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 5, 2, 1, 1, 3, 8, 8, 3, 1, 1, 3, 14, 18, 14, 3, 1, 1, 4, 20, 47, 47, 20, 4, 1, 1, 4, 30, 95, 173, 95, 30, 4, 1, 1, 5, 40, 200, 545, 545, 200, 40, 5, 1, 1, 5, 55, 367, 1682, 2812, 1682, 367, 55, 5, 1, 1, 6, 70, 674, 4745, 14386, 14386, 4745, 674, 70, 6, 1
Offset: 0

Views

Author

Alois P. Heinz, Aug 14 2014

Keywords

Examples

			A(1,4) = 3: [0 0 0 0], [1 0 0 0], [1 1 0 0].
A(1,5) = 3: [0 0 0 0 0], [1 0 0 0 0], [1 1 0 0 0].
A(2,2) = 5:
  [0 0]  [1 0]  [1 1]  [1 0]  [1 0]
  [0 0], [0 0], [0 0], [1 0], [0 1].
A(3,2) = 8:
  [0 0]  [1 0]  [1 1]  [1 0]  [1 0]  [1 0]  [1 0]  [1 1]
  [0 0], [0 0], [0 0], [1 0], [0 1], [1 0], [0 1], [1 0].
  [0 0]  [0 0]  [0 0]  [0 0]  [0 0]  [1 0]  [1 0]  [0 0]
Square array A(n,k) begins:
  1, 1,  1,   1,    1,     1,       1,        1, ...
  1, 1,  2,   2,    3,     3,       4,        4, ...
  1, 2,  5,   8,   14,    20,      30,       40, ...
  1, 2,  8,  18,   47,    95,     200,      367, ...
  1, 3, 14,  47,  173,   545,    1682,     4745, ...
  1, 3, 20,  95,  545,  2812,   14386,    68379, ...
  1, 4, 30, 200, 1682, 14386,  126446,  1072086, ...
  1, 4, 40, 367, 4745, 68379, 1072086, 16821330, ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000012, A008619, A006918(n+1), A246148, A246149, A246150, A246151, A246152, A246153, A246154, A246155.
Main diagonal gives A091059.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; `if`(n=0, {0}, `if`(i<1, {},
          {seq(map(p-> p+j*x^i, b(n-i*j, i-1) )[], j=0..n/i)}))
        end:
    g:= proc(n, k) option remember; add(add(add(mul(mul(add(d*
          coeff(u, x, d), d=divisors(ilcm(i, j)))^(igcd(i, j)*
          coeff(s, x, i)*coeff(t, x, j)), j=1..degree(t)),
          i=1..degree(s))/mul(i^coeff(u, x, i)*coeff(u, x, i)!,
          i=1..degree(u))/mul(i^coeff(t, x, i)*coeff(t, x, i)!,
          i=1..degree(t))/mul(i^coeff(s, x, i)*coeff(s, x, i)!,
          i=1..degree(s)), u=b(2$2)), t=b(n$2)), s=b(k$2))
        end:
    A:= (n, k)-> g(sort([n, k])[]):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i < 1, {}, Flatten[Table[Map[ Function[p, p + j*x^i], b[n - i*j, i - 1]], {j, 0, n/i}]]]];
    g[n_, k_] := g[n, k] = Sum[Sum[Sum[Product[Product[With[{gc = GCD[i, j]* Coefficient[s, x, i]*Coefficient[t, x, j]}, If[gc == 0, 1, Sum[d* Coefficient[u, x, d], {d, Divisors[LCM[i, j]]}]^gc]], {j, 1, Exponent[t, x]}],
    {i, Exponent[s, x]}]/Product[i^Coefficient[u, x, i]*Coefficient[u, x, i]!,
    {i, Exponent[u, x]}]/Product[i^Coefficient[t, x, i]*Coefficient[t, x, i]!,
    {i, Exponent[t, x]}]/Product[i^Coefficient[s, x, i]*Coefficient[s, x, i]!,
    {i, Exponent[s, x]}], {u, b[2, 2]}], {t, b[n, n]}], {s, b[k, k]}];
    A[n_, k_] := g @@ Sort[{n, k}];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Apr 25 2016, adapted from Maple, updated Jan 01 2021 *)

A091057 Number of n X n matrices over symbol set {1,...,n^2} equivalent under any permutation of row, columns or the symbol set.

Original entry on oeis.org

1, 1, 9, 777, 18500104, 322286625959257, 7368376339801908226685191, 422262377369187686156418513093399998333, 105882936532098986759153041871810253870024776751177723954
Offset: 0

Views

Author

Christian G. Bower, Dec 17 2003

Keywords

Crossrefs

Row sums of A242106.

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i < 1, {}, Flatten @ Table[Map[Function[p, p + j*x^i], b[n - i*j, i - 1]], {j, 0, n/i}]]];
    A242095[n_, k_] := A242095[n, k] = With[{co = Coefficient, ex = Exponent}, Sum[Sum[Sum[Product[Product[With[{g = GCD[i, j]*co[s, x, i]*co[t, x, j]}, If[g == 0, 1, Sum[d*co[u, x, d], {d, Divisors[LCM[i, j]]}]^g]], {j, ex[t, x]}], {i, ex[s, x]}]/Product[i^co[u, x, i]*co[u, x, i]!, {i, ex[u, x]}]/Product[i^co[t, x, i]*co[t, x, i]!, {i, ex[t, x]}]/Product[i^co[s, x, i]*co[s, x, i]!, {i, ex[s, x]}], {u, b[k, k]}], {t, b[n, n]}], {s, b[n, n]}]];
    a[n_] := A242095[n, n^2];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 6}] (* Jean-François Alcover, May 29 2023, after Alois P. Heinz in A242095 *)

Formula

a(n) = Sum_{1*s_1+2*s_2+...=n, 1*t_1+2*t_2+...=n, 1*u_1+2*u_2+...=n^2} (fixA[s_1, s_2, ...; t_1, t_2, ...; u_1, u_2, ...]/ (1^s_1*s_1!*2^s_2*s_2!*...*1^t_1*t_1!*2^t_2*t_2!*...*1^u_1*u_1!*2^u_2*u_2!*...)) where fixA[...] = Product_{i,j>=1} ((Sum_{d|lcm(i, j)} (d*u_d))^(gcd(i, j)*s_i*t_j)). - corrected by Max Alekseyev, Jun 03 2023

Extensions

a(7), a(8) from Max Alekseyev, Feb 09 2010

A091062 Number of n X n matrices over symbol set {1,2,3,4,5} equivalent under any permutation of row, columns or the symbol set.

Original entry on oeis.org

1, 1, 9, 649, 2283123, 173636442196, 234378355489344704, 5830719097591168695360621, 2779203181367458204944451774688032, 26174539685600184383643311230836752183522328, 4992259182572292655057303928366260085844535079288641049
Offset: 0

Views

Author

Christian G. Bower, Dec 17 2003

Keywords

Crossrefs

Column k=5 of A242095.

Formula

a(n) = sum_{1*s_1+2*s_2+...=n, 1*t_1+2*t_2+...=n, 1*u_1+2*u_2+...=5} (fixA[s_1, s_2, ...;t_1, t_2, ...;u_1, u_2, ...]/(1^s_1*s_1!*2^s_2*s_2!* ... *1^t_1*t_1!*2^t_2*t_2!* ... *1^u_1*u_1!*2^u_2*u_2!*...)) where fixA[...] = prod_{i, j>=1} ( (sum_{d|lcm(i, j)} (d*u_d))^(gcd(i, j)*s_i*t_j)).

Extensions

a(10) from Alois P. Heinz, Aug 14 2014

A091059 Number of n X n matrices over symbol set {1,2} equivalent under any permutation of row, columns or the symbol set.

Original entry on oeis.org

1, 1, 5, 18, 173, 2812, 126446, 16821330, 7343033248, 10733521835504, 52867612881649880, 882178115128903807148, 50227997322259477864188380, 9837048598740464300126599181536, 6681839615514161335727724211992609234, 15867777966020615016155969700335142344866474
Offset: 0

Views

Author

Christian G. Bower, Dec 17 2003

Keywords

Crossrefs

Main diagonal of A242093.
Column k=2 of A242095.

Formula

a(n) = sum {1*s_1+2*s_2+...=n, 1*t_1+2*t_2+...=n, 1*u_1+2*u_2=2} (fixA[s_1, s_2, ...;t_1, t_2, ...;u_1, u_2] /(1^s_1*s_1!*2^s_2*s_2!*... *1^t_1*t_1!*2^t_2*t_2!*... *1^u_1*u_1!*2^u_2*u_2!)) where fixA[...] = prod {i, j>=1} ( (sum {d|lcm(i, j)} (d*u_d))^(gcd(i, j)*s_i*t_j)).

Extensions

a(15) from Alois P. Heinz, Aug 14 2014

A091058 Number of n X n matrices over symbol set {1,...,n} equivalent under any permutation of row, columns or the symbol set.

Original entry on oeis.org

1, 1, 5, 139, 332034, 173636442196, 27652322898323351716, 2006943506669869627232430791792, 95763314593596534914617136274432901605313744, 4114852471732264714685900791520508800628430894815984377778000
Offset: 0

Views

Author

Christian G. Bower, Dec 17 2003

Keywords

Crossrefs

Main diagonal of A242095.

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i < 1, {}, Flatten @ Table[Map[Function[p, p + j*x^i], b[n - i*j, i - 1]], {j, 0, n/i}]]];
    A242095[n_, k_] := A242095[n, k] = With[{co = Coefficient, ex = Exponent}, Sum[Sum[Sum[Product[Product[With[{g = GCD[i, j]*co[s, x, i]*co[t, x, j]}, If[g == 0, 1, Sum[d*co[u, x, d], {d, Divisors[LCM[i, j]]}]^g]], {j, ex[t, x]}], {i, ex[s, x]}]/Product[i^co[u, x, i]*co[u, x, i]!, {i, ex[u, x]}]/Product[i^co[t, x, i]*co[t, x, i]!, {i, ex[t, x]}]/Product[i^co[s, x, i]*co[s, x, i]!, {i, ex[s, x]}], {u, b[k, k]}], {t, b[n, n]}], {s, b[n, n]}]];
    a[n_] := A242095[n, n];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 12}] (* Jean-François Alcover, May 29 2023, after Alois P. Heinz in A242095 *)
  • Sage
    Pol. = InfinitePolynomialRing(QQ)
    @cached_function
    def Z(n):
        if n == 0: return Pol.one()
        return sum(x[k]*Z(n-k) for k in (1..n))/n
    @cached_function
    def monprod(M):
        p = Pol.one()
        V = [m.variables() for m in M]
        T = cartesian_product(V)
        for t in T:
            r = [Pol.varname_key(str(u))[1] for u in t]
            j = [Pol(M[u[0]]).degree(u[1]) for u in enumerate(t)]
            lcm_r = lcm(r)
            p *= x[lcm_r]^(prod(r)/lcm_r*prod(j))
        return p
    @cached_function
    def pol_isotop(n,k):
        P = Z(n)
        p = Pol.zero()
        coeffs = P.coefficients()
        mons = P.monomials()
        C = cartesian_product(k*[mons])
        Csorted = [tuple(sorted(u)) for u in C]
        Cset = set(Csorted)
        for c in Cset:
            p += Csorted.count(c)*prod([coeffs[mons.index(u)] for u in c])*monprod(c)
        return p
    @cached_function
    def rule_sub(r,m):
        D = 0
        for d in divisors(r):
            try: D += d*m.degrees()[-d-1]
            except: break
        return D
    def a(n,k=2):
        P = Z(n)
        coeffs = P.coefficients()
        Q = pol_isotop(n,k)
        inds = [Pol.varname_key(str(u))[1] for u in Q.variables()]
        p = 0
        for mon in enumerate(P.monomials()):
            m = Pol(mon[1])
            p += coeffs[mon[0]]*Q.subs({x[i]:rule_sub(i,m) for i in inds})
        return p
    # Philip Turecek, Jun 17 2023

Formula

a(n) = Sum_{1*s_1+2*s_2+...=n, 1*t_1+2*t_2+...=n, 1*u_1+2*u_2+...=n} (fixA[s_1, s_2, ...;t_1, t_2, ...;u_1, u_2, ...]/ (1^s_1*s_1!*2^s_2*s_2!*... *1^t_1*t_1!*2^t_2*t_2!*... *1^u_1*u_1!*2^u_2*u_2!*...)) where fixA[...] = Product_{i, j>=1} ( (Sum_{d|lcm(i, j)} (d*u_d))^(gcd(i, j)*s_i*t_j)).
a(n) asymptotic to n^(n^2)/(n!^3) = A002489(n)/(A000142(n)^3).

Extensions

a(9) from Alois P. Heinz, Aug 14 2014

A091061 Number of n X n matrices over symbol set {1,2,3,4} equivalent under any permutation of row, columns or the symbol set.

Original entry on oeis.org

1, 1, 9, 408, 332034, 3327329224, 382430372929443, 521184164586987473279, 8728898357751671813141271503, 1850296785573740600565249566845514268, 5085095493754879591102840109774321148107411672, 184819445887199812520846920949561110945504502827686252918
Offset: 0

Views

Author

Christian G. Bower, Dec 17 2003

Keywords

Crossrefs

Column k=4 of A242095.

Formula

a(n) = sum_{1*s_1+2*s_2+...=n, 1*t_1+2*t_2+...=n, 1*u_1+2*u_2+...=4} (fixA[s_1, s_2, ...;t_1, t_2, ...;u_1, u_2, ...]/(1^s_1*s_1!*2^s_2*s_2!* ... *1^t_1*t_1!*2^t_2*t_2!* ... *1^u_1*u_1!*2^u_2*u_2!*...)) where fixA[...] = prod_{i, j>=1} ( (sum_{d|lcm(i, j)} (d*u_d))^(gcd(i, j)*s_i*t_j)).

Extensions

a(11) from Alois P. Heinz, Aug 14 2014

A242106 Number T(n,k) of inequivalent n X n matrices using exactly k different symbols, where equivalence means permutations of rows or columns or the symbol set; triangle T(n,k), n>=0, 0<=k<=n^2, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 4, 3, 1, 0, 1, 17, 121, 269, 241, 100, 24, 3, 1, 0, 1, 172, 15239, 316622, 1951089, 4820228, 5769214, 3768929, 1451594, 347251, 53628, 5645, 451, 37, 3, 1, 0, 1, 2811, 10802952, 3316523460, 170309112972, 2577666563670, 15839885888526
Offset: 0

Views

Author

Alois P. Heinz, Aug 15 2014

Keywords

Comments

Note that the sequence with very similar number A246106 is related but different! - M. F. Hasler, Apr 29 2022

Examples

			T(2,2) = 4:
  [1 0]  [1 1]  [1 0]  [1 0]
  [0 0], [0 0], [1 0], [0 1].
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1, 4, 3, 1;
  0, 1, 17, 121, 269, 241, 100, 24, 3, 1;
  0, 1, 172, 15239, 316622, 1951089, 4820228, 5769214, 3768929, ...
  0, 1, 2811, 10802952, 3316523460, 170309112972, 2577666563670, ...
  0, 1, 126445, 50459558944, 382379913244053, 233995925116415261, ...
		

Crossrefs

Row sums give A091057.
Main diagonal gives A360664.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; `if`(n=0, {0}, `if`(i<1, {},
          {seq(map(p-> p+j*x^i, b(n-i*j, i-1) )[], j=0..n/i)}))
        end:
    A:= proc(n, k) option remember; add(add(add(mul(mul(add(d*
          coeff(u, x, d), d=divisors(ilcm(i, j)))^(igcd(i, j)*
          coeff(s, x, i)*coeff(t, x, j)), j=1..degree(t)),
          i=1..degree(s))/mul(i^coeff(u, x, i)*coeff(u, x, i)!,
          i=1..degree(u))/mul(i^coeff(t, x, i)*coeff(t, x, i)!,
          i=1..degree(t))/mul(i^coeff(s, x, i)*coeff(s, x, i)!,
          i=1..degree(s)), u=b(k$2)), t=b(n$2)), s=b(n$2))
        end:
    T:= (n, k)-> A(n, k) -A(n, k-1):
    seq(seq(T(n, k), k=0..n^2), n=0..4);
  • Mathematica
    Unprotect[Power]; 0^0 = 1; Protect[Power]; b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i<1, {}, Table[Map[Function[{p}, p+j*x^i], b[n-i*j, i-1]], {j, 0, n/i}] // Flatten]]; A[n_, k_] := A[n, k] = Sum[ Sum[ Sum[ Product[ Product[ Sum[d* Coefficient[u, x, d], {d, Divisors[LCM[i, j]]}]^(GCD[i, j]*Coefficient[s, x, i] * Coefficient[t, x, j]), {j, 1, Exponent[t, x]}], {i, 1, Exponent[s, x]}] / Product[ i^Coefficient[u, x, i]*Coefficient[u, x, i]!, {i, 1, Exponent[u, x]}] / Product[ i^Coefficient[t, x, i]*Coefficient[t, x, i]!, {i, 1, Exponent[t, x]}] / Product[ i^Coefficient[s, x, i]*Coefficient[s, x, i]!, {i, 1, Exponent[s, x]}], {u, b[k, k]}], {t, b[n, n]}], {s, b[n, n]}]; T[n_, k_] := A[n, k] - A[n, k-1]; Table[ Table[T[n, k], {k, 0, n^2}], {n, 0, 4}] // Flatten (* Jean-François Alcover, Feb 13 2015, after Alois P. Heinz *)

Formula

T(n,k) = A242095(n,k) - A242095(n,k-1) for k>0. T(n,0) = A242095(n,0).

A091060 Number of n X n matrices over symbol set {1,2,3} equivalent under any permutation of row, columns or the symbol set.

Original entry on oeis.org

1, 1, 8, 139, 15412, 10805764, 50459685390, 1601741458883376, 355089431048672347272, 563306081052639719480623715, 6532991278768207315727662508956920, 564259839851988012635404101255119945332425, 368759675849515285894392091271956490586673272192738
Offset: 0

Views

Author

Christian G. Bower, Dec 17 2003

Keywords

Crossrefs

Column k=3 of A242095.

Formula

a(n) = sum {1*s_1+2*s_2+...=n, 1*t_1+2*t_2+...=n, 1*u_1+2*u_2+...=3} (fixA[s_1, s_2, ...;t_1, t_2, ...;u_1, u_2, ...]/ (1^s_1*s_1!*2^s_2*s_2!*... *1^t_1*t_1!*2^t_2*t_2!*... *1^u_1*u_1!*2^u_2*u_2!*...)) where fixA[...] = prod {i, j>=1} ( (sum {d|lcm(i, j)} (d*u_d))^(gcd(i, j)*s_i*t_j)).

Extensions

a(11)-a(12) from Alois P. Heinz, Aug 14 2014

A246122 Number of inequivalent n X n matrices with entries from [6], where equivalence means permutations of rows or columns or the symbol set.

Original entry on oeis.org

1, 1, 9, 749, 7103351, 2751303005866, 27652322898323351716, 7366869213307610923597063972, 54115411507106367816317351865506779820, 11308260954207756621186791090352318206730701142842, 68907599774696257326786747006406146821562575208152728866136232
Offset: 0

Views

Author

Alois P. Heinz, Aug 15 2014

Keywords

Crossrefs

Column k=6 of A242095.
Showing 1-10 of 14 results. Next