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.

A309401 a(n) = A306245(n,n).

Original entry on oeis.org

1, 1, 3, 43, 5949, 12950796, 586826390263, 669793946192984257, 22558227235537152753501561, 25741074696455818592335996518315259, 1124843928218943684789052411802502269971863691, 2100464404490451025972467064515428575200326254804659324780
Offset: 0

Views

Author

Seiichi Manyama, Jul 28 2019

Keywords

Crossrefs

Main diagonal of A306245.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(k^j*binomial(n-1, j)*b(j, k), j=0..n-1))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..12);  # Alois P. Heinz, Jul 28 2019
  • Mathematica
    b[0, _] = 1;
    b[n_, k_] := b[n, k] = Sum[k^j Binomial[n-1, j] b[j, k], {j, 0, n-1}];
    a[n_] := b[n, n];
    a /@ Range[0, 12] (* Jean-François Alcover, Nov 14 2020, after Alois P. Heinz *)
  • Ruby
    def ncr(n, r)
      return 1 if r == 0
      (n - r + 1..n).inject(:*) / (1..r).inject(:*)
    end
    def A(k, n)
      ary = [1]
      (1..n).each{|i| ary << (0..i - 1).inject(0){|s, j| s + k ** j * ncr(i - 1, j) * ary[j]}}
      ary
    end
    def A309401(n)
      (0..n).map{|i| A(i, i)}
    end
    p A309401(20)