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 A384186 #7 May 22 2025 01:27:17 %S A384186 0,2,2,2,6,34,214,1506,11990,107234,1065846,11659426,139217494, %T A384186 1801784610,25124797046,375531165794,5989287277014,101524201538146, %U A384186 1822662037112950,34548339122512674,689469487015534166,14450128299126915746 %N A384186 Number of permutations of 1, 2,..., n with exactly one rising or falling successon, namely (n-1)n or n(n-1). %C A384186 For the number of permutations of length n with exactly one rising or falling successon see A086852. For the number of such permutations without either (n-1)n or n(n-1) see A383857, for n >= 1. %F A384186 a(n) = A086652(n) - A383857(n), for n >= 1. %F A384186 a(n) = a(n-2) + 2*(n-2)*A002464(n-2) + 2*A383857(n-2), for n >= 3, with a(1) = 0 and a(2) = 2. One could also use this recurrence for n >= 2, using a(0) = -2 and a(1) = 0. %F A384186 a(n) = a(n-2) + 2*(b(n-1) + b(n-2)), with b = A002464, for n >= 3, with a(1) = 0 and a(2) = 2. %e A384186 a(2) = 2*1 from 12 and the reverted 21. %e A384186 a(3) = 2*1 from 132 and 231. %e A384186 a(4) = 2*1 from 1342 and 2431. %e A384186 a(5) = 2*3 from 24513, 24531, 31452 and 31542, 13542, 25413. %Y A384186 Cf. A002464, A086652, A383857. %K A384186 nonn,easy %O A384186 1,2 %A A384186 _Wolfdieter Lang_, May 21 2025