login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A324172 Number of subsets of {1,...,n} that cross their complement. 17
0, 0, 0, 0, 2, 10, 32, 84, 198, 438, 932, 1936, 3962, 8034, 16200, 32556, 65294, 130798, 261836, 523944, 1048194, 2096730, 4193840, 8388100, 16776662, 33553830, 67108212, 134217024, 268434698, 536870098, 1073740952, 2147482716, 4294966302, 8589933534, 17179868060 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

Two sets cross each other if they are of the form {{...x...y...}, {...z...t...}} where x < z < y < t or z < x < t < y.

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).

FORMULA

a(0) = 0; a(n) = 2^n - n^2 + n - 2.

a(n) = 2*A002662(n-1) for n > 0.

G.f.: 2*x^4/((1-2*x)*(1-x)^3).

a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n>4. - Colin Barker, Feb 18 2019

EXAMPLE

The a(5) = 10 subsets are {1,3}, {1,4}, {2,4}, {2,5}, {3,5}, {1,2,4}, {1,3,4}, {1,3,5}, {2,3,5}, {2,4,5}.

MATHEMATICA

croXQ[stn_]:=MatchQ[stn, {___, {___, x_, ___, y_, ___}, ___, {___, z_, ___, t_, ___}, ___}/; x<z<y<t||z<x<t<y];

Table[Length[Select[Subsets[Range[n]], croXQ[{#, Complement[Range[n], #]}]&]], {n, 0, 10}]

PROG

(PARI) concat([0, 0, 0, 0], Vec(2*x^4 / ((1 - x)^3*(1 - 2*x)) + O(x^40))) \\ Colin Barker, Feb 19 2019

CROSSREFS

Cf. A000108, A000110, A000124, A001263, A002061, A002662, A016098, A306438.

Cf. A324166, A324167, A324168, A324169, A324173.

Sequence in context: A212714 A103290 A131068 * A034555 A084154 A265836

Adjacent sequences:  A324169 A324170 A324171 * A324173 A324174 A324175

KEYWORD

nonn,easy

AUTHOR

Gus Wiseman, Feb 17 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 10 16:05 EDT 2021. Contains 342845 sequences. (Running on oeis4.)