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.

A258306 A(n,k) is the sum over all Motzkin paths of length n of products over all peaks p of (x_p+k*y_p)/y_p, where x_p and y_p are the coordinates of peak p; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 7, 14, 1, 1, 5, 9, 23, 43, 1, 1, 6, 11, 34, 71, 141, 1, 1, 7, 13, 47, 105, 255, 490, 1, 1, 8, 15, 62, 145, 411, 911, 1785, 1, 1, 9, 17, 79, 191, 615, 1496, 3535, 6789, 1, 1, 10, 19, 98, 243, 873, 2269, 6169, 13903, 26809
Offset: 0

Views

Author

Alois P. Heinz, May 25 2015

Keywords

Examples

			Square array A(n,k) begins:
:   1,   1,   1,   1,   1,    1,    1, ...
:   1,   1,   1,   1,   1,    1,    1, ...
:   2,   3,   4,   5,   6,    7,    8, ...
:   5,   7,   9,  11,  13,   15,   17, ...
:  14,  23,  34,  47,  62,   79,   98, ...
:  43,  71, 105, 145, 191,  243,  301, ...
: 141, 255, 411, 615, 873, 1191, 1575, ...
		

Crossrefs

Columns k=0-1 give: A258312, A140456(n+2).
Main diagonal gives A266386.

Programs

  • Maple
    b:= proc(x, y, t, k) option remember; `if`(y>x or y<0, 0,
          `if`(x=0, 1, b(x-1, y-1, false, k)*`if`(t, (x+k*y)/y, 1)
                      +b(x-1, y, false, k) +b(x-1, y+1, true, k)))
        end:
    A:= (n, k)-> b(n, 0, false, k):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[x_, y_, t_, k_] := b[x, y, t, k] = If[y > x || y < 0, 0, If[x == 0, 1, b[x - 1, y - 1, False, k]*If[t, (x + k*y)/y, 1] + b[x - 1, y, False, k] + b[x - 1, y + 1, True, k]]]; A[n_, k_] :=   b[n, 0, False, k]; Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jan 23 2017, translated from Maple *)

Formula

A(n,k) = Sum_{i=0..min(floor(n/2),k)} C(k,i) * i! * A258307(n,i).