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.
%I A091217 #14 Jul 06 2021 16:11:58 %S A091217 1,1,2,6,16,54,232,1132,6024,36262,242080,1775316,14135584,122077832, %T A091217 1131066448,11230979624,118638940864 %N A091217 Number of permutations p of [n] such that the n-1 sums p(i)+p(i+1) (i=1,2,...n-1) are all distinct. %e A091217 For a(4), we have 2+3=1+4, so a(4)=4! - (23)(14) - (14)(32) = 24 - 4 - 4 = 16. %e A091217 For a(5), we have 1+4=2+3, 1+5=2+4, 2+5=3+4 to avoid. %o A091217 (PARI) { for (i=3,9, v=vector(i-1); c=0; for (j=1,i!, x=numtoperm(i,j); for (k=1,i-1, v[k]=x[k]+x[k+1]); fl=0; v=vecsort(v); for (z=1,i-2,if (v[z]==v[z+1],fl=1;break)); if (fl==0,c++)); print1(","c)) } %K A091217 hard,more,nonn %O A091217 0,3 %A A091217 _Jon Perry_, Feb 23 2004 %E A091217 a(10)-a(11) from _John W. Layman_, Mar 10 2004 %E A091217 More terms from _R. H. Hardin_, Nov 11 2008 %E A091217 Definition corrected by _Emeric Deutsch_, Nov 28 2008 %E A091217 a(0)=1 prepended by _Alois P. Heinz_, Jul 06 2021