login
A028244
a(n) = 4^(n-1) - 3*3^(n-1) + 3*2^(n-1) - 1 (essentially Stirling numbers of second kind).
20
0, 0, 0, 6, 60, 390, 2100, 10206, 46620, 204630, 874500, 3669006, 15195180, 62350470, 254135700, 1030793406, 4166023740, 16792841910, 67558001700, 271392695406, 1089054420300, 4366671742950, 17498055448500, 70086339807006
OFFSET
1,4
COMMENTS
For n >= 4, a(n) is equal to the number of functions f: {1,2,...,n-1} -> {1,2,3,4} such that im(f) contains 3 fixed elements. - Aleksandar M. Janjic and Milan Janjic, Feb 27 2007
a(n) is the number of strings of length n-1 defined on {0,1,2,3} that contain at least one 0, at least one 1, at least one 2, and have no restriction on the number of 3's. - Enrique Navarrete, Jan 23 2026
a(n) is the number of topologies on a set of n-1 elements with 5 open sets in the topology. - M. F. Hasler, Jun 23 2026
FORMULA
a(n) = 6*S(n, 4) = 6*A000453(n). - Emeric Deutsch, May 02 2004
G.f.: 6x^4/((1-x)(1-2x)(1-3x)(1-4x)). - R. J. Mathar, Oct 23 2008
E.g.f.: (exp(4*x) - 4*exp(3*x) + 6*exp(2*x) - 4*exp(x) + 1)/4, with a(0) = 0. - Wolfdieter Lang, May 03 2017
a(n) = 2*A032263(n). - Alois P. Heinz, Jan 24 2018
a(n) = A326882(n-1, 4). - M. F. Hasler, Jun 23 2026
EXAMPLE
There are a(4) = 6 topologies with 4 nonempty open sets on a 4-1 = 3-set S = {a, b, c}: Those nonempty open sets are S and the sets which additionally have either any two singletons and their union (e.g., {a}, {b} and {a, b}), or two 2-element sets and their intersection, e.g., {a}, {a, b} and {a, c}. - M. F. Hasler, Jun 23 2026
MATHEMATICA
Table[4^(n - 1) - 3*3^(n - 1) + 3*2^(n - 1) - 1, {n, 1, 30}] (* Stefan Steinerberger, Apr 13 2006 *)
(* Alternative: *)
Table[6*StirlingS2[n, 4], {n, 1, 30}] (* G. C. Greubel, Nov 19 2017 *)
PROG
(Magma) [4^(n-1) - 3*3^(n-1) + 3*2^(n-1) - 1: n in [1..30]]; // G. C. Greubel, Nov 19 2017
(PARI) for(n=1, 30, print1(6*stirling(n, 4, 2), ", ")) \\ G. C. Greubel, Nov 19 2017
CROSSREFS
Column 4 of A326882.
Sequence in context: A006741 A120573 A260345 * A259817 A230842 A353039
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Doug McKenzie (mckfam4(AT)aol.com)
STATUS
approved