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!)
 A131529 Number of permutations of {1,2,...n} for which differences of adjacent numbers are all distinct. 3
 1, 2, 4, 12, 44, 176, 788, 3936, 23264, 152112, 1104876, 8725320, 74715908, 687915040, 6782261964, 71294227456, 796138700016, 9409401651840, 117378774461812 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Joerg Arndt, lexicopraphically first permutation with distinct differences for n=1..30 (permutations of {0,1,2,..,n-1}, i.e., zero based). PROG (C++)  /* gcc -O2 -Wall -lstdc++ A131529.cc */ #include #include #include #include using namespace std; inline int k(const vector & s) {     const int n = s.size();     set diffs;     for (int i=1; i s;         for(int i=1; i<=n; i++) s.push_back(i);         unsigned long long resul=0;         do { resul += k(s); }         while ( next_permutation(s.begin(), s.end()) );         cout << n << " " << resul << endl;     }     return 0; } /* R. J. Mathar, Oct 25 2007 */ CROSSREFS Cf. A040018, A091217, A006967. Sequence in context: A275780 A039301 A180205 * A238111 A165901 A074449 Adjacent sequences:  A131526 A131527 A131528 * A131530 A131531 A131532 KEYWORD more,nonn AUTHOR Vladeta Jovovic, Aug 26 2007 EXTENSIONS 2 more terms from R. J. Mathar, Oct 25 2007 7 more terms from R. H. Hardin, Nov 26 2009 STATUS approved

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 30 12:10 EDT 2020. Contains 333125 sequences. (Running on oeis4.)