OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..350 (first 20 terms from Daniel Suteu)
FORMULA
From Robert Israel, Jun 04 2015: (Start)
E.g.f.: 1/(1 + W(-x))^3 - 1/(1 + W(-x))^2 - x/(W(-x)*(1+W(-x))) where W is the Lambert W function. (End)
EXAMPLE
a(3) = 3^(3+1) + (3-1)^3 = 3^4 + 2^3 = 81 + 8 = 89.
MAPLE
a:= n-> n^(n+1)+(n-1)^n:
seq(a(n), n=0..20); # Alois P. Heinz, Jun 04 2015
MATHEMATICA
Array[#^(# + 1) + (# - 1)^# &, 20] (* Vincenzo Librandi, May 29 2015 *)
PROG
(Sidef)
func a(n) {
(n-1)**n + n**(n+1)
};
1.to(Math.inf).each { |n|
say a(n);
};
(Magma) [n^(n+1)+(n-1)^n: n in [0..20]]; // Vincenzo Librandi, May 29 2015
(PARI) vector(10, n, n^(n+1)+(n-1)^n) \\ Derek Orr, Jun 01 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Suteu, May 28 2015
STATUS
approved