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 A328491 #16 Feb 26 2020 09:56:55 %S A328491 1,1,2,1,4,6,32,89,592,2402,19072,101866,939136,6221228,65291264, %T A328491 516212409,6075261184,55812055946,727912302592,7618369901774, %U A328491 109058247342080,1280820543489044,19965414947799040,259988000952099210,4383593333171363840,62680335913868539796 %N A328491 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j <= k or i <= j > k. %H A328491 Alois P. Heinz, <a href="/A328491/b328491.txt">Table of n, a(n) for n = 0..485</a> %H A328491 Juan S. Auli and Sergi Elizalde, <a href="https://arxiv.org/abs/1906.07365">Consecutive patterns in inversion sequences II: avoiding patterns of relations</a>, arXiv:1906.07365 [math.CO], 2019. %F A328491 a(n) is odd <=> n in { A000225 }. %F A328491 a(n) ~ n! * c * 2^n / Pi^n, where c = 0.292816379603485707589209784583144390652038770449692132953726209770208058... - _Vaclav Kotesovec_, Oct 17 2019 %e A328491 a(0) = 1: the empty sequence. %e A328491 a(1) = 1: 0. %e A328491 a(2) = 2: 00, 01. %e A328491 a(3) = 1: 010. %e A328491 a(4) = 4: 0100, 0101, 0102, 0103. %e A328491 a(5) = 6: 01010, 01020, 01021, 01030, 01031, 01032. %e A328491 a(6) = 32: 010100, 010101, 010102, 010103, 010104, 010105, 010200, 010201, 010202, 010203, 010204, 010205, 010211, 010212, 010213, 010214, 010215, 010300, 010301, 010302, 010303, 010304, 010305, 010311, 010312, 010313, 010314, 010315, 010322, 010323, 010324, 010325. %p A328491 b:= proc(n, j, t, c) option remember; `if`(n=0, 1, add(`if`(c=0 and %p A328491 (i>j xor t), 0, b(n-1, i, is(i<=j), max(0, c-1))), i=1..n)) %p A328491 end: %p A328491 a:= n-> b(n, 0, true, 2): %p A328491 seq(a(n), n=0..27); %t A328491 b[n_, j_, t_, c_] := b[n, j, t, c] = If[n == 0, 1, Sum[If[Xor[i > j, t] && c == 0, 0, b[n - 1, i, i <= j, Max[0, c - 1]]], {i, 1, n}]]; %t A328491 a[n_] := b[n, 0, True, 2]; %t A328491 a /@ Range[0, 27] (* _Jean-François Alcover_, Feb 26 2020, after _Alois P. Heinz_ *) %Y A328491 Cf. A000108, A000142, A000225, A001250, A328357, A328358, A328409, A328425. %K A328491 nonn %O A328491 0,3 %A A328491 _Alois P. Heinz_, Oct 16 2019