login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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).
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)