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.

A205341 T(n,k)=Number of length n+1 nonnegative integer arrays starting and ending with 0 with adjacent elements unequal but differing by no more than k.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 0, 3, 2, 2, 0, 4, 6, 11, 0, 0, 5, 12, 35, 24, 5, 0, 6, 20, 82, 138, 93, 0, 0, 7, 30, 160, 454, 689, 272, 14, 0, 8, 42, 277, 1130, 2912, 3272, 971, 0, 0, 9, 56, 441, 2370, 8927, 18652, 16522, 3194, 42, 0, 10, 72, 660, 4424, 22297, 71630, 124299, 83792, 11293, 0, 0
Offset: 1

Views

Author

R. H. Hardin, Jan 26 2012

Keywords

Comments

Table starts
..0...0.....0......0......0.......0.......0........0........0........0
..1...2.....3......4......5.......6.......7........8........9.......10
..0...2.....6.....12.....20......30......42.......56.......72.......90
..2..11....35.....82....160.....277.....441......660......942.....1295
..0..24...138....454...1130....2370....4424.....7588....12204....18660
..5..93...689...2912...8927...22297...48335....94456...170529...289229
..0.272..3272..18652..71630..214724..542850..1211784..2459988..4633800
.14.971.16522.124299.594405.2133784.6285127.16018970.36557640.76469705

Examples

			Some solutions for n=5, k=3:
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..2....2....2....2....3....2....1....2....2....2....2....2....1....3....2....3
..4....5....4....0....2....4....4....4....1....4....3....1....2....5....5....5
..6....4....3....1....4....1....2....2....0....1....0....2....4....4....4....4
..3....3....2....3....1....2....1....3....3....3....2....3....2....2....2....1
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
		

Crossrefs

Column 1 odd n is A000108((n+5)/2).
Column 2 is A187430.
Row 3 is A002378(n-1).

Programs

  • Mathematica
    T[n_, m_] := T[n, m] = If[n == 0, 1, 1/(n)*Sum[Sum[Binomial[i, l]*(-1)^l* Sum[(-1)^j*Binomial[i-l, j]*Binomial[(-l - 2*j + i)*m - l - j + i - 1, (-l - 2*j + i)*m-j], {j, 0, (i-l)*m/(2*m+1)}], {l, 0, i}]*T[n-i, m], {i, 1, n}]];
    Table[T[n-m+1, m], {n, 1, 11}, {m, n, 1, -1}] // Flatten (* Jean-François Alcover, Sep 24 2019, after Vladimir Kruchinin *)
  • Maxima
    T(n,m):=if n=0 then 1 else 1/(n)*sum(sum(binomial(i,l)*(-1)^l*sum((-1)^j*binomial(i-l,j)*binomial((-l-2*j+i)*m-l-j+i-1,(-l-2*j+i)*m-j),j,0,(i-l)*m/(2*m+1)),l,0,i)*T(n-i,m),i,1,n); /* Vladimir Kruchinin, Apr 07 2017 */

Formula

Empirical for row n:
n=2: T(2,k) = k
n=3: T(3,k) = k^2 - k
n=4: T(4,k) = (4/3)*k^3 - (1/2)*k^2 + (7/6)*k
n=5: T(5,k) = (23/12)*k^4 - (1/2)*k^3 + (1/12)*k^2 - (3/2)*k
n=6: T(6,k) = (44/15)*k^5 - (5/12)*k^4 + (5/12)*k^2 + (31/15)*k
n=7: T(7,k) = (841/180)*k^6 - (1/3)*k^5 - (19/36)*k^4 + (1/3)*k^3 - (103/90)*k^2 - 3*k
T(n,m) = 1/n*Sum_{i=1..n} (Sum_{,l,0,i} (binomial(i,l)*(-1)^l *Sum_{j=0..(i-l)* m/(2*m+1)}((-1)^j*binomial(i-l,j)*binomial((-l-2*j+i)*m-l-j+i-1,(-l-2*j+i)*m-j)))*T(n-i,m)), T(0,m)=1. - Vladimir Kruchinin, Apr 07 2017