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

A213326
a(n) = (n+2)^n - (n+1)^n.
1
0, 1, 7, 61, 671, 9031, 144495, 2685817, 56953279, 1357947691, 35979939623, 1049152023349, 33395827252815, 1152480295105231, 42864668012537311, 1709501546902968817, 72778339220927383295, 3294475298046105653971, 158016649702088758467159
OFFSET
0,3
COMMENTS
a(n) is the number of acyclic functions from subsets of size n-1 or less of {1,...,n+1} to {1,2,...,n+1}. - Dennis P. Walsh, Nov 06 2015
a(n) is the number of parking functions whose largest element is not n+1 and length is n+1. For example, a(2) = 7 because there are seven such parking functions, namely (1,1,1), (1,1,2), (1,2,1), (2,1,1), (1,2,2), (2,1,2), (2,2,1). - Ran Pan, Nov 15 2015
LINKS
FORMULA
a(n) = Sum_{i=0..n-2} binomial(n,i)*((i+1)^(i-1)*(n-i-1)^(n-i-1))).
a(n) = A000272(n+2) - A000169(n+1).
E.g.f.: LambertW(-x)*(LambertW(-x)+x)/((1+LambertW(-x))*x^2). - Alois P. Heinz, Aug 12 2017
MAPLE
A213326:=n->(n+2)^n - (n+1)^n: seq(A213326(n), n=0..20); # Wesley Ivan Hurt, Nov 12 2015
MATHEMATICA
Table[(n + 2)^n - (n + 1)^n, {n, 0, 20}] (* T. D. Noe, Mar 07 2013 *)
PROG
(Maxima) a(n):=sum(binomial(n, i)*((i+1)^(i-1)*(n-i-1)^(n-i-1)), i, 0, n-2);
(PARI) vector(40, n, n--; (n+2)^n-(n+1)^n) \\ Altug Alkan, Nov 11 2015
(Magma) [(n+2)^n - (n+1)^n : n in [0..20]]; // Wesley Ivan Hurt, Nov 12 2015
CROSSREFS
Sequence in context: A218498 A261687 A001830 * A261901 A368324 A350157
KEYWORD
nonn,easy
AUTHOR
Vladimir Kruchinin, Mar 03 2013
STATUS
approved