OFFSET
0,3
COMMENTS
Let b(n) = A302583(n) = ((n+1)^n - (n-1)^n)/2 = 0, 1, 4, 28, 272, ... then lim_{n -> infinity} b(n)/a(n) = tanh(1) = 0.76159415... . - Thomas Ordowski, Dec 06 2012
Obviously, a(n) is always odd number for even n. - Altug Alkan, Sep 28 2015
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..100
FORMULA
a(n) = n! * [x^n] exp(n*x)*cosh(x). - Ilya Gutkovskiy, Apr 10 2018
EXAMPLE
a(3) = (4^3 + 2^3)/2 = 36.
MAPLE
MATHEMATICA
a[n_]:=((n-1)^n+(n+1)^n)/2; a[Range[0, 20]] (* Vladimir Joseph Stephan Orlovsky, Feb 07 2010; modified by G. C. Greubel, Jan 03 2020 *)
Table[((n+1)^n + (n-1)^n)/2, {n, 0, 20}] (* Vincenzo Librandi, Sep 28 2015 *)
PROG
(PARI) a(n) = { ((n + 1)^n + (n - 1)^n)/2 } \\ Harry J. Smith, Jul 29 2009
(Magma) [((n+1)^n + (n-1)^n)/2: n in [0..20]]; // Vincenzo Librandi, Sep 28 2015
(Sage) [((n+1)^n + (n-1)^n)/2 for n in (0..20)] # G. C. Greubel, Jan 03 2020
(GAP) List([0..20], n-> ((n+1)^n + (n-1)^n)/2); # G. C. Greubel, Jan 03 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 02 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org) and Jason Earls, Jun 06 2001
Offset changed from 1 to 0 by Harry J. Smith, Jul 29 2009
a(18)-a(19) from Vincenzo Librandi, Sep 28 2015
STATUS
approved