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.

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

Original entry on oeis.org

-2, -1, -3, -11, -13, 971, 31469, 856073, 23576391, 686321335, 21381059609, 714688329389, 25606611695675, 981043357956611, 40073886188532741, 1740059447428511761, 80079381261983807759, 3895126220983308449519, 199726027609854787271729, 10769816560735764585313397
Offset: 0

Views

Author

Alex Ratushnyak, Aug 07 2012

Keywords

Comments

0^0 is interpreted as 1.

Examples

			a(3) = 2^4 - 3^3 = 16-27 = -11.
		

Crossrefs

Cf. A064232 is essentially equal to (n-1)^(n+1) mod n^n.

Programs

  • Maple
    A215265 := proc(n)
        (n-1)^(n+1)-n^n ;
    end proc: # R. J. Mathar, Aug 07 2012
  • Mathematica
    Join[{-2},Table[(n-1)^(n+1)-n^n,{n,20}]] (* Harvey P. Dale, May 21 2023 *)
  • Python
    for n in range(33):
        print((n-1)**(n+1) - n**n)

Formula

For n>0, a(n) = A046065(n-1) - A101334(n).
E.g.f.: x/W(-x) - (1+x)/(1+W(-x)) - x/(1+W(-x))^2 + x/(1+W(-x))^3, where W is the Lambert W function. - Robert Israel, Mar 29 2017