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.

A094294 a(n) = n*a(n-1) - n + 2 for n > 1; a(1)=1.

Original entry on oeis.org

1, 2, 5, 18, 87, 518, 3621, 28962, 260651, 2606502, 28671513, 344058146, 4472755887, 62618582406, 939278736077, 15028459777218, 255483816212691, 4598708691828422, 87375465144740001, 1747509302894800002, 36697695360790800023, 807349297937397600486, 18569033852560144811157
Offset: 1

Views

Author

Amarnath Murthy, Apr 28 2004

Keywords

Comments

Index of the first occurrence of n in A094293.
For n >= 3, a(n) is also the number of the minimal nonobtuse binary triangulations of the unit n-cube (see Brandts et al. link).

Examples

			From _M. F. Hasler_, Apr 09 2009: (Start)
a(1) = 1;
a(2) = 2*a(1) - 0 =  2;
a(3) = 3*a(2) - 1 =  5;
a(4) = 4*a(3) - 2 = 18;
a(5) = 5*a(4) - 3 = 87. (End)
		

Crossrefs

Programs

  • Maple
    A094294 := proc(n)
        option remember;
        if n =1 then
            1 ;
        else
            n*procname(n-1)-n+2 ;
        end if;
    end proc: # R. J. Mathar, Feb 06 2016
  • Mathematica
    a[1] = 1; a[n_] := a[n] = n*a[n - 1] - n + 2;
    Array[a, 23] (* Jean-François Alcover, Dec 14 2017 *)
  • PARI
    A094294(n)={ local(a=1); for( k=2,n, a=k*a-k+2); a } \\ M. F. Hasler, Apr 09 2009

Formula

a(n+1) = (n+1)*a(n) - n + 1, or a(n) = n*a(n-1) - (n-2). [Corrected by M. F. Hasler, Apr 09 2009]
a(n) = 1 + Sum_{k=2..n} n!/k! = ceiling(n!*(e-2)). - Michel Marcus, Sep 19 2012
Conjecture: (-n+3)*a(n) + (n^2-2*n-2)*a(n-1) - (n-1)*(n-2)*a(n-2) = 0. - R. J. Mathar, Sep 10 2015

Extensions

Edited, corrected and extended by M. F. Hasler, Apr 09 2009