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 A095816 #28 Feb 19 2024 14:18:02 %S A095816 1,1,2,4,18,92,570,4082,33292,304490,3086890,34357812,416526730, %T A095816 5463479106,77094352076,1164544912938,18749754351338,320544941916628, %U A095816 5799226664694602,110695180631374114,2223242026407894732,46868311165318977130,1034758905785710599402 %N A095816 Number of permutations of 1..n with no three elements in correct or reverse order. %C A095816 Counts permutations with the property that no subsequence i(i+1)(i+2) or (i+2)(i+1)i occurs. %H A095816 Andrew Howroyd, <a href="/A095816/b095816.txt">Table of n, a(n) for n = 0..200</a> %H A095816 W. M. Dymacek and I. Lambert, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Dymacek/dymacek5.html">Permutations Avoiding Runs of i, i+1, i+2 or i, i-1, i-2</a>, J. Int. Seq. 14 (2011) # 11.1.6, Table 1. %H A095816 D. M. Jackson and R. C. Read, <a href="http://gdz.sub.uni-goettingen.de/dms/load/img/?PID=GDZPPN002031183">A note on permutations without runs of given length</a>, Aequationes Math. 17 (1978), no. 2-3, 336-343. %F A095816 G.f. Sum_{n>=0} n!*((2*x^m-x^(m+1)-x)/(x^m-1))^n where m = 3. - Ivana Jovovic ( ivana121(AT)EUnet.yu ), Nov 11 2007 %F A095816 From _Vaclav Kotesovec_, May 26 2023: (Start) %F A095816 a(n) ~ n! * (1 - 2/n + 6/n^2 - 28/(3*n^3) - 10/(3*n^4) + 496/(15*n^5) + 1384/(45*n^6) - 79724/(315*n^7) - 259306/(315*n^8) + 3718094/(2835*n^9) + 33233992/(2025*n^10) + ...). %F A095816 a(n) = (n-3)*a(n-1) + 3*(n-1)*a(n-2) + (2*n-5)*a(n-3) - (n-3)*a(n-4) - (2*n-13)*a(n-5) - (n-8)*a(n-6) + (n-6)*a(n-7). %F A095816 (End) %o A095816 (PARI) seq(n)={my(m=3); Vec(sum(k=0, n, k!*((2*x^m-x^(m+1)-x)/(x^m-1) + O(x*x^n))^k))} \\ _Andrew Howroyd_, Aug 31 2018 %Y A095816 Cf. A002464, A095817, A095818. %Y A095816 Cf. A165963, A165964, A078628. [From _Isaac Lambert_, Oct 07 2009] %K A095816 nonn %O A095816 0,3 %A A095816 _Jonas Wallgren_, Jun 08 2004 %E A095816 More terms from Ivana Jovovic (ivana121(AT)EUnet.yu), Nov 11 2007 %E A095816 a(0)=1 prepended by _Max Alekseyev_, Jun 14 2011