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.

Showing 1-3 of 3 results.

A052582 a(n) = 2*n*n!.

Original entry on oeis.org

0, 2, 8, 36, 192, 1200, 8640, 70560, 645120, 6531840, 72576000, 878169600, 11496038400, 161902540800, 2440992153600, 39230231040000, 669529276416000, 12093372555264000, 230485453406208000, 4622513815535616000, 97316080327065600000, 2145819571211796480000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Total number of pairs (a_i,a_(i+1)) in all permutations on [n] such that a_i,a_(i+1) are consecutive integers. - David Callan, Nov 04 2003
Number of permutations of {1,2,...,n+2} such that there is exactly one entry between the entries 1 and 2. Example: a(2)=8 because we have 1324, 1423, 2314, 2413, 3142, 4132, 3241 and 4231. - Emeric Deutsch, Apr 06 2008
Number of permutations of 0 to n distinct letters (ABC...) 1 times ("-" (0), A (1), AB (1-1), ABC (1-1-1), ABCD (1-1-1-1 )etc...) and one after the other to resemble motif:( "-",... BB (0-2), ABB (1-2-0), AABB (2-2-0-0), AAABB (3-2-0-0-0) AAAABB (4-2-0-0-0-0), AAAAABB (5-2-0-0-0-0-0), AAAAAABB (6-2-0-0-0-0-0-0), etc... 0 fixed point (or free fixed point). Example: if ABC (1-1-1) and motif ABB (1-2-0) then 2 * 0 (free) fixed point, if ABCD (1-1-1-1), and motif AABB (2-2-0-0) then 8 * 0 (free) fixed point, if ABCDE (1-1-1-1-1), and motif AAABB (3-2-0-0-0), then 36 * 0 (free) fixed point, if ABCDEF (1-1-1-1-1-1), and motif AAAABB (4-2-0-0-0-0), then 192 * 0 (free) fixed point, if ABCDEFG (1-1-1-1-1-1-1), and motif AAAAABB (5-2-0-0-0-0-0), then 1200 * 0 (free) fixed point, etc... - Zerinvary Lajos, Dec 07 2009

Crossrefs

Programs

  • Haskell
    a052582 n = a052582_list !! n
    a052582_list =  0 : 2 : zipWith
       div (zipWith (*) (tail a052582_list) (drop 2 a000290_list)) [1..]
    -- Reinhard Zumkeller, Nov 12 2011
  • Maple
    spec := [S,{S=Prod(Sequence(Z),Sequence(Z),Union(Z,Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    a[ n_] := If[ n<0, 0, n! SeriesCoefficient[ 2 x / (1 - x)^2, {x, 0, n}]]; (* Michael Somos, Oct 20 2011 *)
    a[ n_] := If[ n<0, 0, 2 n n!]; (* Michael Somos, Oct 20 2011 *)
  • PARI
    {a(n) = if( n<0, 0, 2 * n * n!)}; /* Michael Somos, Oct 20 2011 */
    

Formula

E.g.f.: 2*x / (1 - x)^2.
Recurrence: {a(0)=0, a(1)=2, (-n^2-2*n-1)*a(n)+a(n+1)*n=0.}.
a(n) = A138770(n+2,1). - Emeric Deutsch, Apr 06 2008
a(n) = A001339(n) - A007808(n). - Michael Somos, Oct 20 2011
a(n) = (a(n-1)^2 - 2 * a(n-2)^2 + a(n-2) * a(n-3) - 4 * a(n-1) * a(n-3)) / (a(n-2) - a(n-3)) if n>2. - Michael Somos, Oct 20 2011
a(n) = 2*n*n!. - Gary Detlefs, Sep 16 2010
a(n+1) = a(n) * (n+1)^2 / n. - Reinhard Zumkeller, Nov 12 2011
0 = a(n)*(+a(n+1) -4*a(n+2) +a(n+3)) +a(n+1)*(+2*a(n+1) -a(n+3)) + a(n+2)*(+a(n+2)) if n>=0. - Michael Somos, Jun 26 2017
From Amiram Eldar, Feb 14 2021: (Start)
Sum_{n>=1} 1/a(n) = (Ei(1) - gamma)/2 = (A091725 - A001620)/2, where Ei(x) is the exponential integral.
Sum_{n>=1} (-1)^(n+1)/a(n) = (gamma - Ei(-1))/2 = (A001620 + A099285)/2. (End)
a(n) = 2 * A001563(n). - Alois P. Heinz, Sep 03 2024

A090672 a(n) = (n^2-1)*n!/3.

Original entry on oeis.org

0, 2, 16, 120, 960, 8400, 80640, 846720, 9676800, 119750400, 1596672000, 22832409600, 348713164800, 5666588928000, 97639686144000, 1778437140480000, 34145993097216000, 689322235650048000, 14597412049059840000, 323575967087493120000, 7493338185184051200000
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2003

Keywords

Comments

a(n) = Sum_{pi in Symm(n)} Sum_{i=1..n} |pi(i)-i|, i.e., the total displacement of all letters in all permutations on n letters.
a(n) = number of entries between the entries 1 and 2 in all permutations of {1,2,...,n+1}. Example: a(2)=2 because we have 123, 1(3)2, 213, 2(3)1, 312, 321; the entries between 1 and 2 are surrounded by parentheses. - Emeric Deutsch, Apr 06 2008
a(n) = Sum_{k=0..n-1} k*A138770(n+1,k). - Emeric Deutsch, Apr 06 2008
a(n) is also the number of peaks in all permutations of {1,2,...,n+1}. Example: a(3)=16 because the permutations 1234, 4123, 3124, 4312, 2134, 4213, 3214, and 4321 have no peaks and each of the remaining 16 permutations of {1,2,3,4} has exactly one peak. - Emeric Deutsch, Jul 26 2009
a(n), for n>=2, is the number of (n+2)-node tournaments that have exactly one triad. Proven by Kadane (1966), see link. - Ian R Harris, Sep 26 2022

References

  • D. Daly and P. Vojtechovsky, Displacement of permutations, preprint, 2003.

Crossrefs

Programs

  • Magma
    [(n^2-1)*Factorial(n)/3: n in [1..25]]; // Vincenzo Librandi, Oct 11 2011
  • Mathematica
    nn=20;Drop[Range[0,nn]!CoefficientList[Series[ x^3/3/(1-x)^2,{x,0,nn}],x],2]  (* Geoffrey Critzer, Mar 04 2013 *)

Formula

a(n) = A052571(n+2)/3 = 2*A005990(n). - Zerinvary Lajos, May 11 2007
a(n) = (n+3)! * Sum_{k=1..n} (k+1)!/(k+3)!, with offset 0. - Gary Detlefs, Aug 05 2010
E.g.f.: (x^3 - 3*x^2)/(3*(x-1)^3). - Geoffrey Critzer, Mar 04 2013
From Amiram Eldar, May 14 2022: (Start)
Sum_{n>=2} 1/a(n) = (3/2)*(Ei(1) - gamma) - 3*e + 27/4, where Ei(1) = A091725, gamma = A001620, and e = A001113.
Sum_{n>=2} (-1)^n/a(n) = (3/2)*(gamma - Ei(-1)) - 3/4, where Ei(-1) = -A099285. (End)

A052609 a(n) = (2*n - 2)*n!.

Original entry on oeis.org

0, 0, 4, 24, 144, 960, 7200, 60480, 564480, 5806080, 65318400, 798336000, 10538035200, 149448499200, 2266635571200, 36614882304000, 627683696640000, 11381997699072000, 217680705994752000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Number of permutations of {1,2,...,n+2} such that there are exactly two entries between the entries 1 and 2. Example: a(2)=4 because we have 1342, 1432, 2341 and 2431. - Emeric Deutsch, Apr 06 2008
a(n) = A138770(n+2). - Emeric Deutsch, Apr 06 2008

Crossrefs

Cf. A138770.

Programs

  • Magma
    [0] cat [(2*n-2)*Factorial(n): n in [1..25]]; // Vincenzo Librandi, Oct 11 2011
    
  • Maple
    spec := [S,{S=Prod(Z,Sequence(Z),Sequence(Z),Union(Z,Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • PARI
    a(n)=(2*n-2)*n! \\ Charles R Greathouse IV, Nov 20 2011

Formula

E.g.f.: 2*x^2/(-1+x)^2.
Recurrence: {a(1)=0, a(0)=0, a(2)=4, (-n^2-n)*a(n)+(n-1)*a(n+1)}.
Showing 1-3 of 3 results.