login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A284249 Number T(n,k) of k-element subsets of [n] whose sum is a triangular number; triangle T(n,k), n>=0, 0<=k<=n, read by rows. 13
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 3, 1, 1, 1, 3, 4, 5, 3, 1, 1, 1, 3, 5, 8, 6, 4, 1, 1, 1, 3, 7, 12, 11, 9, 4, 1, 1, 1, 3, 9, 16, 20, 18, 11, 5, 1, 1, 1, 4, 10, 22, 32, 35, 26, 14, 5, 1, 1, 1, 4, 12, 29, 48, 61, 55, 36, 17, 6, 1, 1, 1, 4, 14, 37, 70, 100, 106, 84, 48, 21, 6, 1, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,8

LINKS

Alois P. Heinz, Rows n = 0..200, flattened

Wikipedia, Triangular number

EXAMPLE

Triangle T(n,k) begins:

  1;

  1, 1;

  1, 1,  1;

  1, 2,  1,  1;

  1, 2,  2,  1,  1;

  1, 2,  3,  3,  1,   1;

  1, 3,  4,  5,  3,   1,   1;

  1, 3,  5,  8,  6,   4,   1,  1;

  1, 3,  7, 12, 11,   9,   4,  1,  1;

  1, 3,  9, 16, 20,  18,  11,  5,  1,  1;

  1, 4, 10, 22, 32,  35,  26, 14,  5,  1, 1;

  1, 4, 12, 29, 48,  61,  55, 36, 17,  6, 1, 1;

  1, 4, 14, 37, 70, 100, 106, 84, 48, 21, 6, 1, 1;

MAPLE

b:= proc(n, s) option remember; expand(`if`(n=0,

      `if`(issqr(8*s+1), 1, 0), b(n-1, s)+x*b(n-1, s+n)))

    end:

T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):

seq(T(n), n=0..16);

MATHEMATICA

b[n_, s_] := b[n, s] = Expand[If[n == 0, If[IntegerQ @ Sqrt[8*s + 1], 1, 0], b[n - 1, s] + x*b[n - 1, s + n]]];

T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]];

Table[T[n], {n, 0, 16}] // Flatten (*Jean-Fran├žois Alcover, May 29 2018, from Maple *)

CROSSREFS

Columns k=0-10 give: A000012, A003056, A320848, A320849, A320850, A320851, A320852, A320853, A320854, A320855, A320856.

Second and third lower diagonals give: A008619(n+1), A008747(n+1).

Row sums give A284250.

T(2n,n) gives A284251.

Cf. A000217, A281871.

Sequence in context: A239550 A058398 A091499 * A137350 A334607 A166240

Adjacent sequences:  A284246 A284247 A284248 * A284250 A284251 A284252

KEYWORD

nonn,tabl

AUTHOR

Alois P. Heinz, Mar 23 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 18:56 EDT 2020. Contains 334664 sequences. (Running on oeis4.)