login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052582 a(n) = 2*n*n!. 9

%I #52 Feb 14 2021 02:48:45

%S 0,2,8,36,192,1200,8640,70560,645120,6531840,72576000,878169600,

%T 11496038400,161902540800,2440992153600,39230231040000,

%U 669529276416000,12093372555264000,230485453406208000

%N a(n) = 2*n*n!.

%C 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

%C 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

%C 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

%H Reinhard Zumkeller, <a href="/A052582/b052582.txt">Table of n, a(n) for n = 0..250</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=526">Encyclopedia of Combinatorial Structures 526</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ExponentialIntegral.html">Exponential Integral</a>.

%F E.g.f.: 2*x / (1 - x)^2.

%F Recurrence: {a(0)=0, a(1)=2, (-n^2-2*n-1)*a(n)+a(n+1)*n=0.}.

%F a(n) = A138770(n+2,1). - _Emeric Deutsch_, Apr 06 2008

%F a(n) = A001339(n) - A007808(n). - _Michael Somos_, Oct 20 2011

%F 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

%F a(n) = 2*n*n!. - _Gary Detlefs_, Sep 16 2010

%F a(n+1) = a(n) * (n+1)^2 / n. - _Reinhard Zumkeller_, Nov 12 2011

%F 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

%F From _Amiram Eldar_, Feb 14 2021: (Start)

%F Sum_{n>=1} 1/a(n) = (Ei(1) - gamma)/2 = (A091725 - A001620)/2, where Ei(x) is the exponential integral.

%F Sum_{n>=1} (-1)^(n+1)/a(n) = (gamma - Ei(-1))/2 = (A001620 + A099285)/2. (End)

%p spec := [S,{S=Prod(Sequence(Z),Sequence(Z),Union(Z,Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);

%t a[ n_] := If[ n<0, 0, n! SeriesCoefficient[ 2 x / (1 - x)^2, {x, 0, n}]]; (* _Michael Somos_, Oct 20 2011 *)

%t a[ n_] := If[ n<0, 0, 2 n n!]; (* _Michael Somos_, Oct 20 2011 *)

%o (PARI) {a(n) = if( n<0, 0, 2 * n * n!)}; /* _Michael Somos_, Oct 20 2011 */

%o (Haskell)

%o a052582 n = a052582_list !! n

%o a052582_list = 0 : 2 : zipWith

%o div (zipWith (*) (tail a052582_list) (drop 2 a000290_list)) [1..]

%o -- _Reinhard Zumkeller_, Nov 12 2011

%Y Cf. A001339, A001620, A007808, A138770, A000142, A000290, A091725, A099285.

%K easy,nonn

%O 0,2

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:08 EDT 2024. Contains 371964 sequences. (Running on oeis4.)