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-3 of 3 results.

A357289 a(n) = number of subsets S of {1,2,...,n} having more than 2 elements such that (sum of least three elements of S) > max(S).

Original entry on oeis.org

0, 0, 0, 1, 5, 16, 38, 83, 167, 314, 572, 1021, 1757, 3004, 5082, 8439, 13971, 23086, 37576, 61281, 99833, 160912, 259878, 420283, 672847, 1081058, 1739124, 2774021, 4439701, 7121188, 11326386, 18087487, 28944587, 45962070, 73268704, 117090409, 185684721, 295697784, 472033278, 747983491
Offset: 0

Views

Author

Clark Kimberling, Oct 02 2022

Keywords

Examples

			The 5 relevant subsets of {1,2,3,4} are {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, and {1, 2, 3, 4}.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 3 &];
    a[n_] := Select[s[n], #[[1]] + #[[2]] + #[[3]] > #[[-1]] &]
    Table[Length[a[n]], {n, 0, 16}]

Formula

a(n) = 3*a(n-1) - a(n-2) - a(n-3) - 6*a(n-4) + 2*a(n-5) + 20*a(n-6) - 24*a(n-7) + 8*a(n-8).
G.f.: (x^3 (-1 - 2 x - 2 x^2 + 4 x^3 + 4 x^4))/((-1 + x)^3 (-1 + 2 x^2) (-1 + 4 x^3)).

A357291 a(n) = number of subsets S of {1,2,...,n} having more than 2 elements such that (sum of least two elements of S) < difference between greatest two elements of S.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 8, 19, 42, 89, 185, 378, 766, 1544, 3102, 6220, 12459, 24939, 49902, 99831, 199692, 399417, 798871, 1597782, 3195608, 6391264, 12782580, 25565216, 51130493, 102261051, 204522172, 409044419, 818088918, 1636177921, 3272355933
Offset: 0

Views

Author

Clark Kimberling, Oct 02 2022

Keywords

Examples

			The 3 relevant subsets of {1,2,3,4,5,6,7} are {1, 2, 6}, {1, 2, 7}, {1, 2, 3, 7}.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 3 &];
    a[n_] := Select[s[n], #[[1]] + #[[2]] < #[[-1]] - #[[-2]] &]
    Table[Length[a[n]], {n, 0, 15}]

Formula

a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) + 3*a(n-6) - 2*a(n-7).
G.f.: x^6/((-1 + x)^3 (1 + x) (-1 + 2 x) (1 + x + x^2)).
a(n) ~ A021025*2^n. - Stefano Spezia, Oct 03 2022
a(n) = 2^n/21 - n^2/12 + n/6 + O(1). Conjecture: a(n) = round(2^n/21 - n^2/12 + n/6). - Charles R Greathouse IV, Oct 11 2022

A357292 a(n) = number of subsets S of {1,2,...,n} having more than 2 elements such that (sum of least two elements of S) = difference between greatest two elements of S.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 5, 11, 23, 47, 96, 193, 388, 778, 1558, 3118, 6239, 12480, 24963, 49929, 99861, 199725, 399454, 798911, 1597826, 3195656, 6391316, 12782636, 25565277, 51130558, 102261121, 204522247, 409044499, 818089003, 1636178012, 3272356029
Offset: 0

Views

Author

Clark Kimberling, Oct 02 2022

Keywords

Examples

			The 2 relevant subsets of {1,2,3,4,5,6} are {1, 2, 5} and {1,2,3,6}.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 3 &];
    a[n_] := Select[s[n], #[[1]] + #[[2]] == #[[-1]] - #[[-2]] &]
    Table[Length[a[n]], {n, 0, 16}]

Formula

a(n) = 2*a(n-1) + a(n-2) - a(n-3) - 2*a(n-4) - a(n-5) + 2*a(n-6).
G.f.: -(x^5/((-1 + x)^2 (1 + x) (-1 + 2 x) (1 + x + x^2))).
Showing 1-3 of 3 results.