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.

A137783 a(n) = the number of permutations (p(1), p(2), ..., p(2n+1)) of (1, 2, ..., 2n+1) where, for each k (2 <= k <= 2n+1), the sign of (p(k) - p(k-1)) equals the sign of (p(2n+2-k) - p(2n+3-k)).

This page as a plain text file.
%I A137783 #18 Oct 02 2017 04:00:22
%S A137783 1,4,44,1028,40864,2484032,214050784,24831582176,3731039384576,
%T A137783 704879630525696,163539441616948736,45712130697710081024,
%U A137783 15150993151215400441856,5875388829103413298173952,2635427286694074346846232576,1353918066433734600362650169344
%N A137783 a(n) = the number of permutations (p(1), p(2), ..., p(2n+1)) of (1, 2, ..., 2n+1) where, for each k (2 <= k <= 2n+1), the sign of (p(k) - p(k-1)) equals the sign of (p(2n+2-k) - p(2n+3-k)).
%C A137783 There are no such permutations of (1,2,...,2n).
%H A137783 Alois P. Heinz, <a href="/A137783/b137783.txt">Table of n, a(n) for n = 0..90</a>
%e A137783 Consider the permutation (for n = 3): 3,4,5,2,7,6,1. The signs of the differences between adjacent terms form the sequence: ++-+--, which is the negative of its reversal. So this permutation, among others, is counted when n = 3.
%o A137783 (PARI) { a(n) = my(s,c,r); s=0; forvec(t=vector(n\2,i,[0,2]), c=0; r=[]; for(j=1,#t, if(t[j]==0,c++, if(t[j]==1,r=concat(r,[j]),r=concat(r,[n-j])); ); ); r=vecsort(r); s+=(-2)^c*if(#r,n!/(r[1]!*prod(j=1,#r-1,(r[j+1]-r[j])!)*(n-r[ #r])!),1) ); s } /* _Max Alekseyev_ */
%Y A137783 Cf. A060350, A137782.
%K A137783 nonn
%O A137783 0,2
%A A137783 _Leroy Quet_, Feb 10 2008, Feb 14 2008
%E A137783 First 4 terms calculated by _Olivier Gérard_
%E A137783 Edited and extended by _Max Alekseyev_, May 09 2009