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.

A241580 Triangle read by rows: T(n,k) (1 <= k <= n) defined by T(n,n) = (n-1)^(n-1), T(n,k) = T(n,k+1) - (n-1)*T(n-1,k) for k = n-1 .. 1.

Original entry on oeis.org

1, 0, 1, 2, 2, 4, 3, 9, 15, 27, 40, 52, 88, 148, 256, 205, 405, 665, 1105, 1845, 3125, 2556, 3786, 6216, 10206, 16836, 27906, 46656, 24409, 42301, 68803, 112315, 183757, 301609, 496951, 823543, 347712, 542984, 881392, 1431816, 2330336, 3800392, 6213264, 10188872, 16777216
Offset: 1

Views

Author

N. J. A. Sloane, Apr 29 2014

Keywords

Comments

Arises in analysis of game with n players: each person picks a number from 1 to n, and the winner is the largest unique choice (see Guy's letter). T(n,k) is the number out of all possible games (i.e., all n^n sets of choices) which are won by a given player who has chosen k.

Examples

			Triangle begins:
      1;
      0,     1;
      2,     2,     4;
      3,     9,    15,     27;
     40,    52,    88,    148,    256;
    205,   405,   665,   1105,   1845,   3125;
   2556,  3786,  6216,  10206,  16836,  27906,  46656;
  24409, 42301, 68803, 112315, 183757, 301609, 496951, 823543;
  ...
		

Crossrefs

T(n,0) is A231797, row sums are A241581.

Programs

  • Maple
    M:=20;
    M2:=10;
    T[1,1]:=1:
    for n from 2 to M do
       T[n,n]:=(n-1)^(n-1);
       for k from n-1 by -1 to 1 do
          T[n,k]:=T[n,k+1]-(n-1)*T[n-1,k]:
    od:
    od:
    for n from 1 to M2 do lprint([seq(T[n,k],k=1..n)]); od: