The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A257198 Number of permutations of length n having exactly one descent such that the first element of the permutation is an odd number. 1

%I #44 Sep 08 2022 08:46:12

%S 0,0,2,6,16,36,78,162,332,672,1354,2718,5448,10908,21830,43674,87364,

%T 174744,349506,699030,1398080,2796180,5592382,11184786,22369596,

%U 44739216,89478458,178956942,357913912,715827852,1431655734,2863311498,5726623028

%N Number of permutations of length n having exactly one descent such that the first element of the permutation is an odd number.

%H Colin Barker, <a href="/A257198/b257198.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-3,2).

%F a(n) = 2*floor((2*2^n-3*n-1)/6).

%F a(n) = 2*A178420(n-1).

%F a(n) = A000295(n)-A000975(n-1).

%F From _Colin Barker_, Apr 19 2015: (Start)

%F a(n) = (-3-(-1)^n+2^(2+n)-6*n)/6.

%F a(n) = 3*a(n-1)-a(n-2)-3*a(n-3)+2*a(n-4).

%F G.f.: -2*x^3 / ((x-1)^2*(x+1)*(2*x-1)).

%F (End)

%e a(3)=2: (1 3 2, 3 1 2).

%e a(4)=6: (1 2 4 3, 1 3 2 4, 1 4 2 3, 1 3 4 2, 3 1 2 4, 3 4 1 2).

%t Table[2 Floor[(2 2^n - 3 n - 1) / 6], {n, 50}] (* _Vincenzo Librandi_, Apr 18 2015 *)

%o (Magma) [2*Floor((2*2^n-3*n-1)/6): n in [1..40]]; // _Vincenzo Librandi_, Apr 18 2015

%o (PARI) concat([0,0], Vec(-2*x^3/((x-1)^2*(x+1)*(2*x-1)) + O(x^100))) \\ _Colin Barker_, Apr 19 2015

%o (PARI) a(n)=(2<<n-3*n-1)\6*2 \\ _Charles R Greathouse IV_, Apr 21 2015

%Y Cf. A178420, A000295, A000975, A167030 (first differences).

%K nonn,easy

%O 1,3

%A _Ran Pan_, Apr 18 2015

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 June 9 07:31 EDT 2024. Contains 373229 sequences. (Running on oeis4.)