|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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).
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|