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.

User: Zlatko Damijanic

Zlatko Damijanic's wiki page.

Zlatko Damijanic has authored 3 sequences.

A378377 Triangle read by rows: T(n,k) is the number of non-descending sequences with length k such that the maximum of the length and the last number is n.

Original entry on oeis.org

1, 1, 3, 1, 3, 10, 1, 4, 10, 35, 1, 5, 15, 35, 126, 1, 6, 21, 56, 126, 462, 1, 7, 28, 84, 210, 462, 1716, 1, 8, 36, 120, 330, 792, 1716, 6435, 1, 9, 45, 165, 495, 1287, 3003, 6435, 24310, 1, 10, 55, 220, 715, 2002, 5005, 11440, 24310, 92378
Offset: 1

Author

Zlatko Damijanic, Nov 24 2024

Keywords

Comments

Also the T(n,k) is the number of integer partitions (of any positive integer) with length k such that the maximum of the length and the largest part is n.
When k < n, then the last number is n.

Examples

			Triangle begins:
  1
  1 3
  1 3 10
  1 4 10 35
  1 5 15 35 126
  1 6 21 56 126 462
  1 7 28 84 210 462 1716
  ...
For T(3,1) solution is |{(3)}| = 1.
For T(3,2) solution is |{(1,3), (2,3), (3,3)}| = 3.
For T(3,3) solution is |{(1,1,1), (1,1,2), (1,1,3), (1,2,2), (1,2,3), (1,3,3), (2,2,2), (2,2,3), (2,3,3), (3,3,3)}| = 10.
		

Crossrefs

Cf. A051924 (row sums), A001700 (right diagonal).

Programs

  • Mathematica
    T[n_, k_] := Which[
      k == 1, 1,
      k == n, Binomial[2n-1, n],
      k == n-1, T[n-1, n-1],
      1 < k < n-1, T[n-1, k] + T[n, k-1]
    ];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten
  • PARI
    T(n,k)={if(kAndrew Howroyd, Nov 24 2024

Formula

T(n,n) = binomial(2*n-1,n).
T(n,k) = binomial(k+n-2, n-1) for k < n.

A378241 Numbers of directed Hamiltonian cycles in the complete 4-partite graph K_{n,n,n,n}.

Original entry on oeis.org

6, 1488, 3667680, 37744330752, 1106491456512000, 74213488705904640000, 9872975878366503813120000, 2355966665497190945783808000000, 935825492908108988335792827924480000, 584053924678169568704863421815848960000000
Offset: 1

Author

Zlatko Damijanic, Nov 20 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[Sum[Sum[ (2n - i - j - 1)! 2^(2i) 3^j (n!)^4/(j!) * (3n - 3i - 3j - 2d)!/((2i + j - n + d)! (n - j - d)! (2n - 3i - 2j - d)!) * (2n - 2i - 2j - 2e)!/(e! (d - e)! (2n - 2i - 2j - d - e)! (n - i - j - d + e)! ((n - i - j - e)!)^2), {e, Max[0, i + j - n + d], Min[d, 2n - 2i - 2j - d]}], {d, Max[0, n - j - 2i], Min[n - j, 2n - 3i - 2j]}], {i, 0, Floor[2(n - j)/3]}], {j, 0, n}], {n, 1, 10}]
    Table[(n!)^4 Expand[Hypergeometric1F1[1 - n, 2, x]^4 x^3] /. x^p_ :> p!, {n, 10}] (* Eric W. Weisstein, Feb 20 2025 *)
  • Python
    from math import factorial as fact
    def a(n):
       # Using formula found in Horak et al.
       return sum(sum(sum(sum(
           fact(2*n-i-j-1)*pow(2,2*i)*pow(3,j)*pow(fact(n),4)//fact(j) *
           fact(3*n-3*i-3*j-2*d)//(fact(2*i+j-n+d)*fact(n-j-d)*fact(2*n-3*i-2*j-d)) *
           fact(2*n-2*i-2*j-2*e)//(fact(e)*fact(d-e)*fact(2*n-2*i-2*j-d-e)*fact(n-i-j-d+e)*pow(fact(n-i-j-e),2))
           for e in range(max(0,i+j-n+d), min(d,2*n-2*i-2*j-d)+1))
           for d in range(max(0,n-j-2*i), min(n-j,2*n-3*i-2*j)+1))
           for i in range(int(2*(n-j)/3)+1))
           for j in range(n+1))
    print([a(n) for n in range(1,11)])

Formula

a(n) = 3!*(n-1)!*(n!)^3*A369923(n,4). - Andrew Howroyd, Nov 20 2024
a(n) = 2*A381326(n). - Eric W. Weisstein, Feb 20 2025

A377586 Numbers of directed Hamiltonian paths in the complete 4-partite graph K_{n,n,n,n}.

Original entry on oeis.org

24, 13824, 53529984, 751480602624, 27917203599360000, 2267561150913576960000, 354252505303682314076160000, 97087054992658680467800719360000, 43551509948777170973522371396239360000, 30293653795894300342540281328749772800000000
Offset: 1

Author

Zlatko Damijanic, Nov 02 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n!^4 * SeriesCoefficient[1/(1 - Sum[x[i]/(1 + x[i]), {i, 1, 4}]), Sequence @@ Table[{x[i], 0, n}, {i, 1, 4}]], {n, 1, 10}]
  • Python
    from math import factorial as fact, comb
    from itertools import combinations_with_replacement
    def a(n):
        #  Using modified formula for counting sequences found in Eifler et al.
        result = 0
        fn = fact(n)
        for i, j, k in combinations_with_replacement(range(1, n+1), 3):
            patterns = [(3,0,0)] if i == j == k else \
              [(2,0,1)] if i == j != k else \
              [(1,2,0)] if i != j == k else [(1,1,1)]
            for a, b, c in patterns:
                s = a*i + b*j + c*k
                num = fact(3)
                den = fact(a) * fact(b) * fact(c)
                if a:
                    for _ in range(a): num, den = num * comb(n-1, i-1), den * fact(i)
                if b:
                    for _ in range(b): num, den = num * comb(n-1, j-1), den * fact(j)
                if c:
                    for _ in range(c): num, den = num * comb(n-1, k-1), den * fact(k)
                num *= comb(s + 1, n) * fact(s)
                result += (1 if (3*n - s) % 2 == 0 else -1) * (num // den)
        for _ in range(4): result *= fn
        return result
    print([a(n) for n in range(1,11)]) # Zlatko Damijanic, Nov 18 2024

Formula

a(n) = 24 * n!^4 * A190918(n).
a(n) = n!^4 * A322093(n,4).