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-2 of 2 results.

A229345 Number A(n,k) of lattice paths from {n}^k to {0}^k using steps that decrement one component or all components by the same positive integer; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 7, 22, 4, 1, 1, 25, 248, 188, 8, 1, 1, 121, 6506, 11380, 1712, 16, 1, 1, 721, 292442, 2359348, 577124, 16098, 32, 1, 1, 5041, 19450082, 1088626684, 991365512, 30970588, 154352, 64, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2013

Keywords

Examples

			A(2,2) = 22: [(2,2),(1,1),(0,0)], [(2,2),(1,1),(0,1),(0,0)], [(2,2),(1,1),(1,0),(0,0)], [(2,2),(0,0)], [(2,2),(1,2),(0,1),(0,0)], [(2,2),(1,2),(0,2),(0,1),(0,0)], [(2,2),(1,2),(0,2),(0,0)], [(2,2),(1,2),(1,1),(0,0)], [(2,2),(1,2),(1,1),(0,1),(0,0)], [(2,2),(1,2),(1,1),(1,0),(0,0)], [(2,2),(1,2),(1,0),(0,0)], [(2,2),(0,2),(0,1),(0,0)], [(2,2),(0,2),(0,0)], [(2,2),(2,1),(1,0),(0,0)], [(2,2),(2,1),(1,1),(0,0)], [(2,2),(2,1),(1,1),(0,1),(0,0)], [(2,2),(2,1),(1,1),(1,0),(0,0)], [(2,2),(2,1),(0,1),(0,0)], [(2,2),(2,1),(2,0),(1,0),(0,0)], [(2,2),(2,1),(2,0),(0,0)], [(2,2),(2,0),(1,0),(0,0)], [(2,2),(2,0),(0,0)].
Square array A(n,k) begins:
  1,  1,     1,        1,            1,                 1, ...
  1,  1,     3,        7,           25,               121, ...
  1,  2,    22,      248,         6506,            292442, ...
  1,  4,   188,    11380,      2359348,        1088626684, ...
  1,  8,  1712,   577124,    991365512,     4943064622568, ...
  1, 16, 16098, 30970588, 453530591824, 25162900228200976, ...
		

Crossrefs

Columns k=0-3 give: A000012, A011782, A132595(n+1), A229482.
Rows n=0-2 give: A000012, A038507 (for k>1), A229465.
Main diagonal gives: A229346.

Programs

  • Maple
    b:= proc(l) option remember; local m; m:= nops(l);
          `if`(m=0 or l[m]=0, 1,
          `if`(m>1, add(b(l-[j$m]), j=1..l[1]), 0)+
          add(add(b(sort(subsop(i=l[i]-j, l))), j=1..l[i]), i=1..m))
        end:
    A:= (n, k)-> b([n$k]):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, Sep 24 2013
  • Mathematica
    b[l_] := b[l] = With[{m = Length[l]}, If[m == 0 || l[[m]] == 0, 1, If[m > 1, Sum[b[l - Array[j&, m]], {j, 1, l[[1]]}],  0] + Sum[Sum[b[Sort[ReplacePart[l, i -> l[[i]] - j]]], {j, 1, l[[i]]}], {i, 1, m}]]]; a[n_, k_] := b[Array[n&, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 16 2013, translated from Maple *)

A143734 Number of paths of a generalized chess Queen from (0,0,0) to (n,n,n) in a cube, in which the Queen moves toward the goal point at each step.

Original entry on oeis.org

1, 13, 638, 41476, 3015296, 232878412, 18691183682, 1540840801552, 129548309399618, 11057865563760844, 955237244106091682, 83324522236732005112, 7327068320498628273506, 648679579345635742189498, 57761885964038080406607410, 5169168679056263697679753150
Offset: 0

Views

Author

Martin J. Erickson (erickson(AT)truman.edu), Aug 30 2008

Keywords

Comments

a(n) is the number of sequences whose terms are multiples of (0,0,1), (0,1,0), (1,0,0), (0,1,1), (1,0,1), (1,1,0), or (1,1,1) and whose sum is (n,n,n).

Examples

			a(1)=13 because there are 13 generalized Queen paths from (0,0,0) to (1,1,1).
		

Crossrefs

A132595 gives the two-dimensional version of this sequence.

Programs

  • Maple
    b:= proc(x, y, z) option remember; `if`(x=0 and y=0 and z=0, 1,
          add(b(x-i, y, z), i=1..x)+ add(b(x, y-i, z), i=1..y)+
          add(b(x, y, z-i), i=1..z)+ add(b(x-i, y-i, z), i=1..min(x, y))+
          add(b(x-i, y, z-i), i=1..min(x, z))+ add(b(x, y-i, z-i),
          i=1..min(y, z))+ add(b(x-i, y-i, z-i), i=1..min(x, y, z)))
        end:
    a:= n-> b(n$3): seq(a(n), n=0..20);  # Alois P. Heinz, Jul 23 2012
  • Mathematica
    q[1, 1, 1] = 1; q[1, 1, 2] = 1; q[1, 2, 1] = 1; q[1, 1, 2] = 1; q[i_, j_, k_] := q[i, j, k] = Sum[q[x, j, k], {x, 1, i - 1}] + Sum[q[i, y, k], {y, 1, j - 1}] + Sum[q[i, j, z], {z, 1, k - 1}] + Sum[q[i - w, j - w, k], {w, 1, Min[i, j]}] + Sum[q[i, j - w, k - w], {w, 1, Min[j, k]}] + Sum[q[i - w, j, k - w], {w, 1, Min[i, k]}] + Sum[q[i - w, j - w, k - w], {w, 1, Min[i, j, k]}]; a[n_] := q[n, n, n];

Formula

q(1,1,1) = 1; q(1,1,2) = 1; q(1,2,1) = 1; q(1,1,2) = 1; q(i_,j,k) = Sum(q(x,j,k), {x,1,i-1}) + Sum(q(i,y,k), {y,1,j-1}] + Sum(q(i,j,z), {z,1,k-1}) + Sum(q(i-w,j-w,k), {w,1,Min(i,j)}) + Sum(q(i,j-w,k-w), {w,1,Min(j, k)}) + Sum(q(i-w,j,k-w), {w,1,Min(i,k)}) + Sum(q(i-w,j-w,k-w), {w,1,Min(i,j,k)}); a(n) = q(n,n,n).
a(n) ~ c * d^(3*n) / n, where d = 4.575760096729293131840036142861966071... is the root of the equation -8 - 11*d - 9*d^2 - 2*d^3 + d^4 = 0, and c = 0.14917103190900041974882341373298677... . - Vaclav Kotesovec, Aug 23 2014
Showing 1-2 of 2 results.