login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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).
1

%I #35 Dec 07 2021 16:40:17

%S 6,30,105,315,868,2268,5715,14025,33726,79794,186277,429975,982920,

%T 2228088,5013351,11206485,24903490,55050030,121110297,265289475,

%U 578813676,1258290900,2726297275,5888802465,12683574918,27246198378,58384711245,124822486575,266287971856,566935682544

%N 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).

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

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (9,-33,63,-66,36,-8).

%F 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.

%F a(n) = Sum_{j=3..ceiling(n/2)} binomial(n,j)*binomial(j,2), if n is odd.

%F 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

%F a(n) = A000554(n)/2. - _Enrique Navarrete_, Nov 16 2021

%F a(n) = binomial(n,2) * Stirling2(n-2,2). - _Alois P. Heinz_, Nov 16 2021

%e 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}.

%t nterms=50;Table[Binomial[n,2]*StirlingS2[n-2,2],{n,4,nterms+3}] (* _Paolo Xausa_, Nov 20 2021 *)

%Y Cf. A000554, A260006.

%K nonn,easy

%O 4,1

%A _Enrique Navarrete_, Oct 08 2021