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.

Showing 1-10 of 12 results. Next

A281871 Number T(n,k) of k-element subsets of [n] having a square element sum; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 2, 0, 0, 1, 2, 3, 3, 2, 1, 0, 1, 2, 4, 5, 5, 2, 1, 0, 1, 2, 5, 8, 8, 6, 3, 0, 1, 1, 3, 6, 11, 14, 13, 7, 4, 1, 0, 1, 3, 7, 15, 23, 24, 19, 10, 3, 1, 0, 1, 3, 8, 20, 34, 43, 39, 25, 13, 3, 1, 0, 1, 3, 9, 26, 49, 71, 74, 60, 34, 14, 5, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Jan 31 2017

Keywords

Examples

			T(7,0) = 1: {}.
T(7,1) = 2: {1}, {4}.
T(7,2) = 4: {1,3}, {2,7}, {3,6}, {4,5}.
T(7,3) = 5: {1,2,6}, {1,3,5}, {2,3,4}, {3,6,7}, {4,5,7}.
T(7,4) = 5: {1,2,6,7}, {1,3,5,7}, {1,4,5,6}, {2,3,4,7}, {2,3,5,6}.
T(7,5) = 2: {1,2,3,4,6}, {3,4,5,6,7}.
T(7,6) = 1: {1,2,4,5,6,7}.
T(7,7) = 0.
T(8,8) = 1: {1,2,3,4,5,6,7,8}.
Triangle T(n,k) begins:
  1;
  1, 1;
  1, 1, 0;
  1, 1, 1,  0;
  1, 2, 1,  1,  0;
  1, 2, 2,  2,  0,  0;
  1, 2, 3,  3,  2,  1,  0;
  1, 2, 4,  5,  5,  2,  1,  0;
  1, 2, 5,  8,  8,  6,  3,  0,  1;
  1, 3, 6, 11, 14, 13,  7,  4,  1,  0;
  1, 3, 7, 15, 23, 24, 19, 10,  3,  1, 0;
  1, 3, 8, 20, 34, 43, 39, 25, 13,  3, 1, 0;
  1, 3, 9, 26, 49, 71, 74, 60, 34, 14, 5, 0, 0;
  ...
		

Crossrefs

Main diagonal is characteristic function of A001108.
Diagonals T(n+k,n) for k=2-10 give: A281965, A281966, A281967, A281968, A281969, A281970, A281971, A281972, A281973.
Row sums give A126024.
T(2n,n) gives A281872.

Programs

  • Maple
    b:= proc(n, s) option remember; expand(`if`(n=0,
          `if`(issqr(s), 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[s], 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, 10}] // Flatten (* Jean-François Alcover, Jun 03 2018, from Maple *)

Formula

T(n,n) = 1 for n in { A001108 }, T(n,n) = 0 otherwise.
T(n,n-1) = 1 for n in { A214857 }, T(n,n-1) = 0 for n in { A214858 }.
Sum_{k=0..n} k * T(n,k) = A377572(n).

A284250 Number of subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 18, 29, 49, 85, 151, 271, 493, 904, 1674, 3118, 5835, 10966, 20698, 39187, 74413, 141684, 270386, 517110, 990889, 1902108, 3657241, 7042490, 13580079, 26220417, 50687371, 98095126, 190042856, 368539253, 715349145, 1389731960, 2702098563
Offset: 0

Views

Author

Alois P. Heinz, Mar 23 2017

Keywords

Crossrefs

Row sums of A284249.
Cf. A126024.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0,
          `if`(issqr(8*s+1), 1, 0), b(n-1, s)+b(n-1, s+n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0,
         If[IntegerQ@Sqrt[8*s + 1], 1, 0], b[n - 1, s] + b[n - 1, s + n]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 17 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n} A284249(n,k).

A284251 Number of n-element subsets of [2n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 2, 5, 11, 35, 106, 337, 1112, 3741, 12821, 44576, 156862, 557580, 1999117, 7221134, 26253632, 95996850, 352798772, 1302457652, 4828002125, 17962539164, 67052864821, 251066424023, 942692613615, 3548654963966, 13390078255129, 50635057984917
Offset: 0

Views

Author

Alois P. Heinz, Mar 23 2017

Keywords

Crossrefs

Formula

a(n) = A284249(2n,n).

A320848 Number of 2-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 29, 32, 34, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 73, 77, 80, 83, 86, 89, 93, 97, 101, 105, 109, 112, 116, 120, 124, 128, 132, 136, 140, 145, 150, 154, 158, 162, 166, 170, 174, 179, 184, 189
Offset: 2

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=2 of A284249.
Cf. A000217.

A320849 Number of 3-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 3, 5, 8, 12, 16, 22, 29, 37, 46, 57, 69, 82, 97, 114, 131, 150, 171, 194, 219, 245, 273, 302, 334, 368, 404, 441, 480, 522, 567, 613, 660, 710, 762, 818, 876, 936, 997, 1061, 1127, 1196, 1268, 1342, 1419, 1498, 1580, 1664, 1751, 1841, 1934, 2029, 2127
Offset: 3

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=3 of A284249.
Cf. A000217.

A320850 Number of 4-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 3, 6, 11, 20, 32, 48, 70, 98, 132, 174, 226, 287, 359, 444, 542, 655, 783, 928, 1092, 1275, 1479, 1707, 1957, 2231, 2534, 2865, 3225, 3617, 4040, 4497, 4993, 5527, 6098, 6710, 7363, 8062, 8810, 9605, 10447, 11342, 12291, 13295, 14358, 15478, 16658, 17904
Offset: 4

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=4 of A284249.
Cf. A000217.

A320851 Number of 5-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 4, 9, 18, 35, 61, 100, 156, 235, 342, 482, 664, 895, 1185, 1542, 1977, 2505, 3134, 3879, 4757, 5782, 6968, 8337, 9909, 11699, 13732, 16030, 18615, 21514, 24755, 28361, 32362, 36789, 41673, 47051, 52953, 59412, 66466, 74158, 82525, 91611, 101454, 112097
Offset: 5

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=5 of A284249.
Cf. A000217.

A320852 Number of 6-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 4, 11, 26, 55, 106, 190, 321, 518, 804, 1207, 1763, 2511, 3502, 4794, 6447, 8541, 11163, 14407, 18382, 23215, 29040, 36005, 44284, 54059, 65529, 78918, 94466, 112434, 133104, 156783, 183803, 214518, 249307, 288580, 332774, 382358, 437829, 499717, 568579
Offset: 6

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=6 of A284249.
Cf. A000217.

A320853 Number of 7-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 5, 14, 36, 84, 174, 337, 613, 1058, 1749, 2787, 4304, 6463, 9476, 13598, 19140, 26486, 36079, 48461, 64263, 84209, 109160, 140100, 178144, 224578, 280871, 348655, 429780, 526341, 640642, 775262, 933082, 1117259, 1331289, 1579031, 1864697, 2192905
Offset: 7

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=7 of A284249.
Cf. A000217.

A320854 Number of 8-element subsets of [n] whose sum is a triangular number.

Original entry on oeis.org

1, 1, 5, 17, 48, 122, 276, 573, 1112, 2042, 3578, 6024, 9803, 15476, 23793, 35728, 52522, 75761, 107416, 149923, 206288, 280145, 375868, 498713, 654914, 851807, 1098032, 1403673, 1780402, 2241738, 2803237, 3482687, 4300406, 5279489, 6446078, 7829696, 9463558
Offset: 8

Views

Author

Alois P. Heinz, Oct 22 2018

Keywords

Crossrefs

Column k=8 of A284249.
Cf. A000217.
Showing 1-10 of 12 results. Next