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.

A281596 a(n) = ((n-2)^n - 2*(n-1)^n + n^n)/2.

Original entry on oeis.org

0, 0, 1, 6, 55, 660, 9751, 170898, 3463615, 79669320, 2050086511, 58346365110, 1819621847407, 61705703989020, 2260586259354151, 88971796139662842, 3743940350046570751, 167735288431662235920, 7971302827015366403551, 400510700317394780627934, 21212944650652080893863087
Offset: 0

Views

Author

Peter Luschny, Jan 26 2017

Keywords

Crossrefs

Programs

  • Maple
    a := n -> ((n-2)^n-2*(n-1)^n+n^n)/2:
    seq(a(n), n=0..21);
  • Mathematica
    A281596[n_] := If[n == 0, 0, ((n-2)^n - 2*(n-1)^n + n^n)/2];
    Array[A281596, 25, 0] (* Paolo Xausa, Jul 10 2024 *)

Formula

a(n) ~ n^n*(1/2+(1/2-1/n)*e^(-2)+(1/(2*n)-1)*e^(-1)).