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.

A000774 a(n) = n!*(1 + Sum_{i=1..n} 1/i).

Original entry on oeis.org

1, 2, 5, 17, 74, 394, 2484, 18108, 149904, 1389456, 14257440, 160460640, 1965444480, 26029779840, 370643938560, 5646837369600, 91657072281600, 1579093018675200, 28779361764249600, 553210247226470400, 11185850044938240000, 237335752951879680000
Offset: 0

Views

Author

Keywords

Comments

Number of {12,12*,21}-avoiding signed permutations in the hyperoctahedral group.
Let M be the n X n matrix with M( i, i ) = i+1, other entries = 1. Then a(n) = det(M); example: a(3) = 17 = det([2, 1, 1; 1, 3, 1; 1, 1, 4]). - Philippe Deléham, Jun 13 2005.
With offset 1: number of permutations of the n-set into at most two cycles. - Joerg Arndt, Jun 22 2009
A ball goes with probability 1/(k+1) from place k to a place j with j=0..k; a(n)/n! is the average number of steps from place n to place 0. - Paul Weisenhorn, Jun 03 2010
a(n) is a multiple of A025527(n). - Charles R Greathouse IV, Oct 16 2012

Examples

			(1-x)^-1 * (1 - log(1-x)) = 1 + 2*x + 5/2*x^2 + 17/6*x^3 + ...
G.f.: 1+x = 1/(1+x) + 2*x/((1+x)*(1+2*x)) + 5*x^2/((1+x)*(1+2*x)*(1+3*x)) + 17*x^3/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)) + 74*x^4/((1+x)*(1+2*x)*(1+3*x)*(1+4*x)*(1+5*x)) +...
		

Crossrefs

Cf. A000254, A000776. Same as A081046 apart from signs.

Programs

  • Maple
    A000774 := proc(n) local i,j; j := 0; for i to n do j := j+1/i od; (j+1)*n! end;
    ZL :=[S, {S = Set(Cycle(Z),3 > card)}, labelled]: seq(combstruct[count](ZL, size=n), n=1..20); # Zerinvary Lajos, Mar 25 2008
    a[0]:=1: p:=1: for n from 1 to 20 do
    a[n]:=n*a[n-1]+p: p:=p*n: end do: # Paul Weisenhorn, Jun 03 2010
  • Mathematica
    Table[n!(1+Sum[1/i,{i,n}]),{n,0,30}] (* Harvey P. Dale, Oct 03 2011 *)
  • PARI
    a(n)=n!*(1+sum(j=1,n, 1/j ));
    
  • PARI
    {a(n)=if(n==0, 1, polcoeff(1+x-sum(k=0, n-1, a(k)*x^k/prod(j=1, k+1, (1+j*x+x*O(x^n)) )), n))} /* Paul D. Hanna, Mar 01 2012 */

Formula

E.g.f.: A(x) = (1-x)^-1 * (1 - log(1-x)).
a(n+1) = (n+1)*a(n) + n!. - Jon Perry, Sep 26 2004
a(n) = A000254(n) + n!. - Mark van Hoeij, Jul 06 2010
G.f.: 1+x = Sum_{n>=0} a(n) * x^n / Product_{k=1..n+1} (1 + k*x). - Paul D. Hanna, Mar 01 2012
a(n) = Sum_{k=0..n} (k+1)*|s(n,k)|, where s(n,k) are Stirling numbers of the first kind (A008275). - Peter Luschny, Oct 16 2012
Conjecture: a(n) +(-2*n+1)*a(n-1) +(n-1)^2*a(n-2)=0. - R. J. Mathar, Nov 26 2012