OFFSET
1,3
LINKS
Derek Orr, Table of n, a(n) for n = 1..100
EXAMPLE
6^5 - 5^4 - 4^3 - 3^2 - 2^1 - 1^0 = 7075 so a(6) = 7075.
MATHEMATICA
a[n_] := n^(n - 1) - Sum[i^(i - 1), {i, 1, n - 1}]; Table[a[n], {n, 20}] (* Carlos Eduardo Olivieri, May 29 2015 *)
PROG
(Python)
def sub(n):
..num = n**(n-1)
..for i in range(0, n-1):
......num -= (i+1)**i
..return num
n = 1
while n < 100:
..print(sub(n), end=', ')
..n += 1
(PARI) vector(20, n, n^(n-1)-sum(i=1, n-1, i^(i-1))) \\ Derek Orr, Apr 05 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Derek Orr, Nov 30 2013
EXTENSIONS
Name edited by Derek Orr, Apr 05 2015
STATUS
approved