A258388 a(n) = n^(n+1) + (n-1)^n.
1, 1, 9, 89, 1105, 16649, 295561, 6044737, 139982529, 3621002129, 103486784401, 3238428376721, 110131633755793, 4044369591078361, 159505471943511513, 6723976451270702849, 301716313535065716481, 14358232357247077816865, 722298429807405401348641
Offset: 0
Examples
a(3) = 3^(3+1) + (3-1)^3 = 3^4 + 2^3 = 81 + 8 = 89.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..350 (first 20 terms from Daniel Suteu)
Programs
-
Magma
[n^(n+1)+(n-1)^n: n in [0..20]]; // Vincenzo Librandi, May 29 2015
-
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 *)
-
PARI
vector(10,n,n^(n+1)+(n-1)^n) \\ Derek Orr, Jun 01 2015
-
Sidef
func a(n) { (n-1)**n + n**(n+1) }; 1.to(Math.inf).each { |n| say a(n); };
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)