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.

A357290 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, 1, 5, 15, 39, 91, 200, 424, 879, 1796, 3639, 7334, 14734, 29545, 59179, 118459, 237033, 474195, 948534, 1897228, 3794633, 7589460, 15179133, 30358498, 60717248, 121434769, 242869833, 485739983, 971480307, 1942960979, 3885922348, 7771845112
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]] > #[[-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^3 (1 + 2 x + x^2 + x^3))/((-1 + x)^3 (1 + x) (-1 + 2 x) (1 + x + x^2)).