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.

A187080 Triangle T(n,k) read by rows: fountains of n coins and height k.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 4, 0, 0, 0, 0, 1, 7, 1, 0, 0, 0, 0, 1, 12, 2, 0, 0, 0, 0, 0, 1, 20, 5, 0, 0, 0, 0, 0, 0, 1, 33, 11, 0, 0, 0, 0, 0, 0, 0, 1, 54, 22, 1, 0, 0, 0, 0, 0, 0, 0, 1, 88, 44, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 143, 85, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 232, 161, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 376, 302, 25, 0, 0, 0
Offset: 0

Views

Author

Joerg Arndt, Mar 08 2011

Keywords

Comments

See A005169 for the definition of a "fountain of n coins". [John W. Layman, Mar 10 2011]

Examples

			Triangle begins:
1;
0,1;
0,1,0;
0,1,1,0;
0,1,2,0,0;
0,1,4,0,0,0;
0,1,7,1,0,0,0;
0,1,12,2,0,0,0,0;
0,1,20,5,0,0,0,0,0;
0,1,33,11,0,0,0,0,0,0;
0,1,54,22,1,0,0,0,0,0,0;
0,1,88,44,2,0,0,0,0,0,0,0;
0,1,143,85,5,0,0,0,0,0,0,0,0;
0,1,232,161,12,0,0,0,0,0,0,0,0,0;
0,1,376,302,25,0,0,0,0,0,0,0,0,0,0;
0,1,609,559,52,1,0,0,0,0,0,0,0,0,0,0;
0,1,986,1026,105,2,0,0,0,0,0,0,0,0,0,0,0;
0,1,1596,1870,207,5,0,0,0,0,0,0,0,0,0,0,0,0;
The 15 compositions corresponding to fountains of 7 coins are the following:
   #:    composition      height
   1:    [ 1 2 3 1 ]        3
   2:    [ 1 2 2 2 ]        2
   3:    [ 1 1 2 3 ]        3
   4:    [ 1 2 2 1 1 ]      2
   5:    [ 1 2 1 2 1 ]      2
   6:    [ 1 1 2 2 1 ]      2
   7:    [ 1 2 1 1 2 ]      2
   8:    [ 1 1 2 1 2 ]      2
   9:    [ 1 1 1 2 2 ]      2
  10:    [ 1 2 1 1 1 1 ]    2
  11:    [ 1 1 2 1 1 1 ]    2
  12:    [ 1 1 1 2 1 1 ]    2
  13:    [ 1 1 1 1 2 1 ]    2
  14:    [ 1 1 1 1 1 2 ]    2
  15:    [ 1 1 1 1 1 1 1 ]  1
  stats:  0 1 12 2 0 0 0 0
		

Crossrefs

Row sums give A005169 (fountains of n coins).
Cf. A047998, A187081 (sandpiles by height).

Programs

  • Mathematica
    b[n_, i_, h_] := b[n, i, h] = If[n == 0, x^h, Sum[b[n - j, j, Max[h, j]], {j, 1, Min[i + 1, n]}]];
    T[n_] := Table[Coefficient[#, x, i], {i, 0, n}]& @ b[n, 0, 0];
    Table[T[n], {n, 0, 25}] // Flatten (* Jean-François Alcover, May 31 2019, after Alois P. Heinz in A291878 *)

Formula

T(n,1) + T(n,2) = Fibonacci(n).