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.

A232821 a(n) = n^(n-1) - Sum_{k=1..n-1} k^(k-1).

Original entry on oeis.org

1, 1, 6, 52, 549, 7075, 109172, 1971026, 40823443, 954730001, 24892154602, 716025676088, 22528094057193, 769646697066375, 28375143175948712, 1122910795732014438, 47478259662185188967, 2136067435649547983973, 101891594614083396452878
Offset: 1

Views

Author

Derek Orr, Nov 30 2013

Keywords

Examples

			6^5 - 5^4 - 4^3 - 3^2 - 2^1 - 1^0 = 7075 so a(6) = 7075.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    vector(20,n,n^(n-1)-sum(i=1,n-1,i^(i-1))) \\ Derek Orr, Apr 05 2015
  • 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
    

Formula

a(n) = n^(n-1) - A060946(n-1).
a(n) = A000169(n) - Sum_{k=1..n-1} A000169(k).

Extensions

Name edited by Derek Orr, Apr 05 2015