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

A320453
a(n) = (n^n + n*(-1)^n)/(n + 1).
1
0, 2, 6, 52, 520, 6666, 102942, 1864136, 38742048, 909090910, 23775972550, 685853880636, 21633936185160, 740800455037202, 27368368148803710, 1085102592571150096, 45957792327018709120, 2070863582910344082918, 98920982783015679456198, 4993219047619047619047620
OFFSET
1,2
COMMENTS
In a game in which n+1 players are passing a ball from one to another, a(n) is the number of ways that the ball can start at a given player and, on the n-th pass, return (not necessarily for the first time) to that same player. E.g., the a(3)=6 ways are A-BCA, A-CBA, A-BDA, A-DBA, A-CDA, A-DCA.
LINKS
FORMULA
a(n) = (n^n + n*(-1)^n)/(n + 1).
a(n) = A000312(n+1) - A185634(n) = A185634(n)/n + (-1)^n.
MAPLE
a:=n->(n^n+n*(-1)^n)/(n+1): seq(a(n), n=1..20); # Muniru A Asiru, Oct 13 2018
MATHEMATICA
Table[(n^n + n*(-1)^n)/(n + 1), {n, 0, 50}]
PROG
(PARI) a(n) = (n^n + n*(-1)^n)/(n + 1);
(GAP) List([1..20], n->(n^n+n*(-1)^n)/(n+1)); # Muniru A Asiru, Oct 13 2018
(Magma) [(n^n + n*(-1)^n)/(n + 1) : n in [1..25]]; // Vincenzo Librandi, Oct 14 2018
CROSSREFS
Sequence in context: A298994 A203634 A027263 * A277477 A357243 A277363
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Oct 13 2018
EXTENSIONS
a(10)-a(20) from Muniru A Asiru, Oct 13 2018
STATUS
approved