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.

A182210 Triangle T(n,k) = floor(k*(n+1)/(k+1)), 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 4, 5, 3, 4, 5, 5, 5, 6, 4, 5, 6, 6, 6, 6, 7, 4, 6, 6, 7, 7, 7, 7, 8, 5, 6, 7, 8, 8, 8, 8, 8, 9, 5, 7, 8, 8, 9, 9, 9, 9, 9, 10, 6, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11, 6, 8, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 7, 9, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 7, 10, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 8, 10, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15
Offset: 1

Views

Author

Dennis P. Walsh, Apr 18 2012

Keywords

Comments

T(n,k) is the maximum number of wins in a sequence of n games in which the longest winning streak is of length k.
T(n,k) generalizes the pattern found in sequence A004523 where A004523(n) = floor(2n/3).

Examples

			T(12,4) = 10 since 10 is the maximum number of wins in a 12-game sequence in which the longest winning streak is 4. One such sequence with 10 wins is WWWWLWWWWLWW.
The triangle T(n,k) begins
1,
1, 2,
2, 2, 3,
2, 3, 3,  4,
3, 4, 4,  4,  5,
3, 4, 5,  5,  5,  6,
4, 5, 6,  6,  6,  6,  7,
4, 6, 6,  7,  7,  7,  7,  8,
5, 6, 7,  8,  8,  8,  8,  8,  9,
5, 7, 8,  8,  9,  9,  9,  9,  9, 10,
6, 8, 9,  9, 10, 10, 10, 10, 10, 10, 11,
6, 8, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12,
		

Crossrefs

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

Programs

  • Haskell
    a182210 n k = a182210_tabl !! (n-1) !! (k-1)
    a182210_tabl = [[k*(n+1) `div` (k+1) | k <- [1..n]] | n <- [1..]]
    -- Reinhard Zumkeller, Jul 08 2012
  • Maple
    seq(seq(floor(k*(n+1)/(k+1)),k=1..n),n=1..15);
  • Mathematica
    Flatten[Table[Floor[k*(n+1)/(k+1)],{n,0,20},{k,n}]] (* Harvey P. Dale, Jul 21 2015 *)

Formula

T(n,k) = floor(k(n+1)/(k+1)).