login
A081209
a(n) = Sum_{k=0..n} (-1)^(n-k)*n^k.
7
1, 0, 3, 20, 205, 2604, 39991, 720600, 14913081, 348678440, 9090909091, 261535698060, 8230246567621, 281241170407092, 10371206370520815, 410525522232055664, 17361641481138401521, 781282469559318055056, 37275544492386193492507, 1879498672877297909667780
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
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
Cf. A031973.
Sequence in context: A295100 A367922 A052590 * A196560 A257476 A218673
KEYWORD
nonn,easy
AUTHOR
Vladeta Jovovic, Apr 17 2003
STATUS
approved