The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A064482 Triangle read by rows: T(n,k) (n >= 2, 1<=k<=n-1) is the number of permutations p of 1,...,n with max(|p(i)-p(i-1)|, i=2..n) = k. 2
 2, 2, 4, 2, 10, 12, 2, 18, 52, 48, 2, 32, 146, 300, 240, 2, 54, 372, 1204, 1968, 1440, 2, 86, 954, 4082, 10476, 14640, 10080, 2, 134, 2376, 13348, 46012, 97968, 122400, 80640, 2, 206, 5704, 44274, 186202, 536652, 990960, 1139040, 725760, 2, 312, 13278, 145216, 742940, 2655004, 6562128, 10847520, 11692800, 7257600 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS T(n,n-1) = A052849; sum(T(n,k),k=1..n-1) = A000142. LINKS Alois P. Heinz, Rows n = 2..18, flattened EXAMPLE Triangle T(n,k) begins:   2;   2,   4;   2,  10,   12;   2,  18,   52,    48;   2,  32,  146,   300,   240;   2,  54,  372,  1204,  1968,  1440;   2,  86,  954,  4082, 10476, 14640,  10080;   2, 134, 2376, 13348, 46012, 97968, 122400, 80640; PROG (C++) #include #include #include using namespace std; inline int k(const vector & s) { const int n = s.size() ; int kmax = 0 ; for(int i=1; i kmax) kmax = thisdiff ; } return kmax ; } int main(int argc, char *argv[]) { for(int n=2 ;; n++) { vector s; for(int i=1; i<=n; i++) s.push_back(i) ; vector resul(n); do { resul[k(s)]++ ; } while( next_permutation(s.begin(), s.end()) ) ; for(int i=1; i

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

Last modified March 28 11:00 EDT 2020. Contains 333083 sequences. (Running on oeis4.)