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.

A348257 Number of ways we can write [n] as the union of 2 sets of sizes i, j which intersect in exactly 2 elements (2 < i,j < n; i = j allowed).

Original entry on oeis.org

6, 30, 105, 315, 868, 2268, 5715, 14025, 33726, 79794, 186277, 429975, 982920, 2228088, 5013351, 11206485, 24903490, 55050030, 121110297, 265289475, 578813676, 1258290900, 2726297275, 5888802465, 12683574918, 27246198378, 58384711245, 124822486575, 266287971856, 566935682544
Offset: 4

Views

Author

Enrique Navarrete, Oct 08 2021

Keywords

Comments

The terms in the sequence alternate 2 even and 2 odd.

Examples

			a(4) = 6 since we can write [4] as the following unions: {1,2,3} U {1,2,4}, {1,2,3} U {1,3,4}, {1,2,3} U {2,3,4}, {1,2,4} U {1,3,4}, {1,2,4} U {2,3,4}, {1,3,4} U {2,3,4}.
		

Crossrefs

Programs

  • Mathematica
    nterms=50;Table[Binomial[n,2]*StirlingS2[n-2,2],{n,4,nterms+3}] (* Paolo Xausa, Nov 20 2021 *)

Formula

a(n) = (Sum_{j=3..n/2} binomial(n,j)*binomial(j,2)) + (1/2)*binomial(n,n/2+1) * binomial(n/2+1,2), if n is even.
a(n) = Sum_{j=3..ceiling(n/2)} binomial(n,j)*binomial(j,2), if n is odd.
G.f.: x^4*(6 - 24*x + 33*x^2 - 18*x^3 + 4*x^4)/((1 - x)^3*(1 - 2*x)^3). - Stefano Spezia, Oct 09 2021
a(n) = A000554(n)/2. - Enrique Navarrete, Nov 16 2021
a(n) = binomial(n,2) * Stirling2(n-2,2). - Alois P. Heinz, Nov 16 2021