cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A081209 a(n) = Sum_{k=0..n} (-1)^(n-k)*n^k.

Original entry on oeis.org

1, 0, 3, 20, 205, 2604, 39991, 720600, 14913081, 348678440, 9090909091, 261535698060, 8230246567621, 281241170407092, 10371206370520815, 410525522232055664, 17361641481138401521, 781282469559318055056, 37275544492386193492507, 1879498672877297909667780
Offset: 0

Views

Author

Vladeta Jovovic, Apr 17 2003

Keywords

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

Crossrefs

Cf. A031973.

Programs

  • Mathematica
    a[n_]:=(n^(n+1)+(-1)^n)/(n+1); Array[a,20,0] (* Stefano Spezia, Jul 15 2025 *)
  • PARI
    {a(n) = (-1)^n*sum(k=0, n, (-n)^k)} \\ Seiichi Manyama, Sep 12 2019

Formula

a(n) = (n^(n+1)+(-1)^n)/(n+1).