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.

A259975 Irregular triangle read by rows: T(n,k) = number of ways of placing n balls into k boxes in such a way that any two adjacent boxes contain at least 4 balls.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 1, 1, 6, 4, 1, 7, 9, 1, 8, 16, 1, 9, 25, 15, 1, 1, 10, 35, 40, 8, 1, 11, 46, 76, 31, 1, 12, 58, 124, 85, 1, 13, 71, 185, 190, 35, 1, 1, 14, 85, 260, 360, 154, 13, 1, 15, 100, 350, 610, 424, 76, 1, 16, 116, 456, 956, 930, 295
Offset: 0

Views

Author

N. J. A. Sloane, Jul 12 2015

Keywords

Examples

			Triangle begins:
  1;
  1;
  1;
  1;
  1,  5,   1;
  1,  6,   4;
  1,  7,   9;
  1,  8,  16;
  1,  9,  25,  15,   1;
  1, 10,  35,  40,   8;
  1, 11,  46,  76,  31;
  1, 12,  58, 124,  85;
  1, 13,  71, 185, 190,  35,  1;
  1, 14,  85, 260, 360, 154, 13;
  1, 15, 100, 350, 610, 424, 76;
  ...
		

Crossrefs

Row sums give A257666.

Programs

  • Maple
    b:= proc(n, v) option remember; expand(`if`(n=0,
          `if`(v=0, 1+x, 1), add(x*b(n-j, max(0, 4-j)), j=v..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 0)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Jul 12 2015
  • Mathematica
    b[n_, v_] := b[n, v] = Expand[If[n == 0, If[v == 0, 1+x, 1], Sum[x*b[n-j, Max[0, 4-j]], {j, v, n}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Feb 13 2016, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jul 12 2015