%I #102 Mar 05 2024 09:07:22
%S 0,0,2,12,50,180,602,1932,6050,18660,57002,173052,523250,1577940,
%T 4750202,14283372,42915650,128878020,386896202,1161212892,3484687250,
%U 10456158900,31372671002,94126401612,282395982050,847221500580,2541731610602,7625329049532
%N a(n) = 3^(n-1) - 2^n + 1 (essentially Stirling numbers of second kind).
%C For n >= 3, a(n) is equal to the number of functions f: {1,2,...,n-1} -> {1,2,3} such that Im(f) contains 2 fixed elements. - Aleksandar M. Janjic and _Milan Janjic_, Mar 08 2007
%C Let P(A) be the power set of an n-element set A. Then a(n+1) = the number of pairs of elements {x,y} of P(A) for which x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x. - _Ross La Haye_, Jan 02 2008
%C Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x is not a subset of y and y is not a subset of x and x and y are disjoint. Then a(n+1) = |R|. - _Ross La Haye_, Mar 19 2009
%C Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if either 0) x is a proper subset of y or y is a proper subset of x, or 1) x is not a subset of y and y is not a subset of x and x and y are disjoint. Then a(n+2) = |R|. - _Ross La Haye_, Mar 19 2009
%C In the terdragon curve, a(n) is the number of triple-visited points in expansion level n. The first differences of this sequence (A056182) are the number of enclosed unit triangles since on segment expansion each unit triangle forms a new triple-visited point, and existing triple-visited points are unchanged. - _Kevin Ryde_, Oct 20 2020
%C a(n+1) is the number of ternary strings of length n that contain at least one 0 and one 1; for example, for n=3, a(4)=12 since the strings are the 3 permutations of 100, the 3 permutations of 110, and the 6 permutations of 210. - _Enrique Navarrete_, Aug 13 2021
%C From _Sanjay Ramassamy_, Dec 23 2021: (Start)
%C a(n+1) is the number of topological configurations of n points and n lines where the points lie at the vertices of a convex cyclic n-gon and the lines are the perpendicular bisectors of its sides.
%C a(n+1) is the number of 2n-tuples composed of n 0's and n 1's which have an interlacing signature. The signature of a 2n-tuple (v_1,...,v_{2n}) is the n-tuple (s_1,...,s_n) defined by s_i=v_i+v_{i+n}. The signature is called interlacing if after deleting the 1's, there are letters remaining and the remaining 0's and 2's are alternating. (End)
%C a(n+1) is the number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty proper subset of B. If either "nonempty" or "proper" is omitted then see A001047. If "nonempty" and "proper" are omitted then see A000244. - _Manfred Boergens_, Mar 28 2023
%C a(n) is the number of (n-1) X (n-1) nilpotent Boolean relation matrices with rank equal to 1. a(n) = A060867(n-1) - A005061(n-1) (since every rank 1 matrix is either idempotent or nilpotent). - _Geoffrey Critzer_, Jul 13 2023
%C For odd n > 3, a(n) is also the number of minimum vertex colorings in the (n-1)-prism graph. - _Eric W. Weisstein_, Mar 05 2024
%H Seiichi Manyama, <a href="/A028243/b028243.txt">Table of n, a(n) for n = 1..2096</a>
%H Ovidiu Bagdasar, <a href="http://www.dunp.np.ac.rs/wp-content/uploads/2018/11/vol6br2-3.pdf">On some functions involving the lcm and gcd of integer tuples</a>, Scientific Publications of the State University of Novi Pazar, Appl. Maths. Inform. and Mech., Vol. 6, 2 (2014), 91-100.
%H J. Brandts and C. Cihangir, <a href="http://www.math.cas.cz/~am2013/proceedings/contributions/brandts.pdf">Counting triangles that share their vertices with the unit n-cube</a>, in Conference Applications of Mathematics 2013 in honor of the 70th birthday of Karel Segeth. Jan Brandts, Sergey Korotov, et al., eds., Institute of Mathematics AS CR, Prague 2013.
%H K. S. Immink, <a href="http://dx.doi.org/10.1049/el.2013.3558">Coding Schemes for Multi-Level Channels that are Intrinsically Resistant Against Unknown Gain and/or Offset Using Reference Symbols</a>, Electronics Letters, Volume: 50, Issue: 1, January 2 2014.
%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>
%H Ross La Haye, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/LaHaye/lahaye5.html">Binary Relations on the Power Set of an n-Element Set</a>, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6.
%H P. Melotti, S. Ramassamy and P. Thévenin, <a href="https://arxiv.org/abs/2003.11006">Points and lines configurations for perpendicular bisectors of convex cyclic polygons</a>, arXiv:2003.11006 [math.CO], 2020.
%H Rajesh Kumar Mohapatra and Tzung-Pei Hong, <a href="https://doi.org/10.3390/math10071161">On the Number of Finite Fuzzy Subsets with Analysis of Integer Sequences</a>, Mathematics (2022) Vol. 10, No. 7, 1161.
%H Kevin Ryde, <a href="http://user42.tuxfamily.org/terdragon/index.html">Iterations of the Terdragon Curve</a>, see index "T triple-visited points".
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MinimumVertexColoring.html">Minimum Vertex Coloring</a>.
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrismGraph.html">Prism Graph</a>.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-11,6).
%F a(n) = 2*S(n, 3) = 2*A000392(n). - _Emeric Deutsch_, May 02 2004
%F G.f.: -2*x^3/(-1+x)/(-1+3*x)/(-1+2*x) = -1/3 - (1/3)/(-1+3*x) + 1/(-1+2*x) - 1/(-1+x). - _R. J. Mathar_, Nov 22 2007
%F E.g.f.: (exp(3*x) - 3*exp(2*x) + 3*exp(x) - 1)/3, with a(0) = 0. - _Wolfdieter Lang_, May 03 2017
%F E.g.f. with offset 0: exp(x)*(exp(x)-1)^2. - _Enrique Navarrete_, Aug 13 2021
%t Table[2 StirlingS2[n, 3], {n, 24}] (* or *)
%t Table[3^(n - 1) - 2*2^(n - 1) + 1, {n, 24}] (* or *)
%t Rest@ CoefficientList[Series[-2 x^3/(-1 + x)/(-1 + 3 x)/(-1 + 2 x), {x, 0, 24}], x] (* _Michael De Vlieger_, Sep 24 2016 *)
%o (Sage) [stirling_number2(i,3)*2 for i in range(1,30)] # _Zerinvary Lajos_, Jun 26 2008
%o (Magma) [3^(n-1) - 2*2^(n-1) + 1: n in [1..30]]; // _G. C. Greubel_, Nov 19 2017
%o (PARI) for(n=1,30, print1(3^(n-1) - 2*2^(n-1) + 1, ", ")) \\ _G. C. Greubel_, Nov 19 2017
%Y Cf. A000392, A008277, A163626, A056182 (first differences), A000244, A001047
%K nonn,easy
%O 1,3
%A _N. J. A. Sloane_, Doug McKenzie (mckfam4(AT)aol.com)