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.

A348704 a(n) = Sum_{x_1+x_2+ ... +x_n=n, 0 <= x_1<= x_2 <= ... <= x_n <= n} ((n-1)*n)!/((n-x_1)! * (n-x_2)! * ... * (n-x_n)!).

Original entry on oeis.org

1, 1, 3, 170, 1027950, 1079901406584, 448687115051986530720, 89290138377185872821028908288000, 14759276773881730859717740767606565269685350000, 2387650794422480788739162652666454048976136433287918499830000000
Offset: 0

Views

Author

Seiichi Manyama, Oct 30 2021

Keywords

Crossrefs

Programs

  • Ruby
    def f(n)
      return 1 if n < 2
      (1..n).inject(:*)
    end
    def A(k, n)
      sum = 0
      m = f((k - 1) * n)
      (0..n).to_a.repeated_combination(k){|i|
        if (0..k - 1).inject(0){|s, j| s + i[j]} == n
          sum += m / (0..k - 1).inject(1){|s, j| s * f(n - i[j])}
        end
      }
      sum
    end
    def A348704(n)
      (0..n).map{|i| A(i, i)}
    end
    p A348704(7)