OFFSET
1,1
LINKS
Daniel Suteu, Table of n, a(n) for n = 1..20
FORMULA
a(n) = (n+1)^n + n^(n-1).
EXAMPLE
For n=3 the a(3) = 73.
(3+1)^3 + 3^(3-1) = 4^3 + 3^2.
4^3 + 3^2 = 64 + 9 = 73.
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+1)^n + n^(n-1): n in [1..20]]; // Vincenzo Librandi, May 29 2015
(PARI) vector(10, n, (n+1)^n+n^(n-1)) \\ Derek Orr, Jun 01 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Suteu, May 28 2015
STATUS
approved