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!)
A000239 One-half of number of permutations of [n] with exactly one run of adjacent symbols differing by 1.
(Formerly M2758 N1109)
3

%I M2758 N1109 #37 Feb 06 2016 09:46:27

%S 1,1,3,8,28,143,933,7150,62310,607445,6545935,77232740,989893248,

%T 13692587323,203271723033,3223180454138,54362625941818,

%U 971708196867905,18347779304380995,364911199401630640,7624625589633857940,166977535317365068775,3824547112283439914893,91440772473772839055238

%N One-half of number of permutations of [n] with exactly one run of adjacent symbols differing by 1.

%C First differences seem to be in A000130. - _Ralf Stephan_, Aug 28 2003

%D F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 264, Table 7.6.2.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Jean-François Alcover, <a href="/A000239/b000239.txt">Table of n, a(n) for n = 1..40</a>

%e The permutation 3 2 1 4 5 7 6 has three such runs: 3-2-1, 4-5 and 7-6.

%e For n<=3 all permutations have one such run. For n=4, 16 have one run, two have no such runs (2413 and 3142), and 6 have two runs (1243, 2134, 2143, 3412, 3421), so a(4) = 16/2 = 8.

%t S[n_] := S[n] = If[n<4, {1, 1, 2*t, 4*t + 2*t^2}[[n+1]], (n+1-t)* S[n-1] - (1-t)*(n-2+3*t)*S[n-2] - (1-t)^2*(n-5+t)*S[n-3] + (1-t)^3*(n-3)*S[n-4]]; A000239 = Join[{1}, Table[Coefficient[S[n], t, 1]/2, {n, 1, 20}] // Accumulate // Rest] (* _Jean-François Alcover_, Feb 06 2016, from successive accumulation of A000130 *)

%Y This is a diagonal of the irregular triangle in A010030.

%K nonn

%O 1,3

%A _N. J. A. Sloane_

%E Entry revised by _N. J. A. Sloane_, Apr 14 2014

%E More terms from _Jean-François Alcover_, Feb 06 2016

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 May 7 18:53 EDT 2024. Contains 372313 sequences. (Running on oeis4.)