OFFSET
0,3
COMMENTS
In base n, a(n) has n digits, which are (beginning from the left): n-1, 0, n-1, 0, n-1, 0, and so on, except that if n is even the rightmost digit is 1 instead of 0. For example, a(6) in base 6 is 505051, and a(7) in base 7 is 6060606. - Mathew Englander, Oct 19 2020
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..386
FORMULA
a(n) = (n^(n+1)+(-1)^n)/(n+1).
PROG
(PARI) {a(n) = (-1)^n*sum(k=0, n, (-n)^k)} \\ Seiichi Manyama, Sep 12 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladeta Jovovic, Apr 17 2003
STATUS
approved