cp's OEIS Frontend

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.

A189711 Number of non-monotonic functions from [k] to [n-k].

This page as a plain text file.
%I A189711 #28 May 15 2017 14:45:21
%S A189711 2,10,8,28,54,22,60,190,204,52,110,490,916,676,114,182,1050,2878,3932,
%T A189711 2118,240,280,1988,7278,15210,16148,6474,494,408,3444,15890,45738,
%U A189711 77470,65210,19576,1004,570,5580,31192,115808,278358,389640,261708,58920,2026,770,8580,56484,258720,820118,1677048,1951700,1048008,176994,4072,1012,12650,96006,525444,2090296,5758802,10073698,9763628,4193580,531262,8166
%N A189711 Number of non-monotonic functions from [k] to [n-k].
%C A189711 Triangle T(n,k), 3<=k<=n-2, given by (n-k)^k-2*C(n-1,k)+(n-k) is derived using inclusion/exclusion. The triangle contains several other listed sequences: T(2n,n) is sequence A056174(n), number of monotonic functions from [n] to [n]; T(n+2,n) is sequence A005803(n), second-order Eulerian numbers; and T(n,3) is A006331(n-4), maximum accumulated number of electrons at energy level n.
%H A189711 Reinhard Zumkeller, <a href="/A189711/b189711.txt">Rows n=5..100 of triangle, flattened</a>
%H A189711 Dennis Walsh, <a href="http://frank.mtsu.edu/~dwalsh/MONOFUNC.pdf">Notes on finite monotonic and non-monotonic functions</a>
%F A189711 T(n,k)=(n-k)^k-2*C(n-1,k)+(n-k).
%F A189711 T(n,3) = A006331(n-4) for n>=5.
%F A189711 T(n+2,n) = A005803(n) for n>=3.
%F A189711 T(2n,n) = A056174(n) for n>=3.
%e A189711 Triangle T(n,k) begins
%e A189711   n\k    3     4     5     6     7     8     9
%e A189711    5     2
%e A189711    6    10     8
%e A189711    7    28    54    22
%e A189711    8    60   190   204    52
%e A189711    9   110   490   916   676   114
%e A189711   10   182  1050  2878  3932  2118   240
%e A189711   11   280  1988  7278 15210 16148  6474   494
%e A189711   ...
%e A189711 For n=6 and k=4, T(6,4)=8 since there are 8 non-monotonic functions f from [4] to [2], namely, f = <f(1),f(2),f(3),f(4)> given by <1,1,2,1>, <1,2,1,1>, <1,2,2,1>, <1,2,1,2>, <2,2,1,2>, <2,1,2,2>, <2,1,1,2>, and <2,1,2,1>.
%p A189711 seq(seq((n-k)^k-2*binomial(n-1,k)+(n-k),k=3..(n-2)),n=5..15);
%t A189711 nmax = 15; t[n_, k_] := (n-k)^k-2*Binomial[n-1, k]+(n-k); Flatten[ Table[ t[n, k], {n, 5, nmax}, {k, 3, n-2}]](* _Jean-François Alcover_, Nov 18 2011, after Maple *)
%o A189711 (Haskell)
%o A189711 a189711 n k = (n - k) ^ k - 2 * a007318 (n - 1) k + n - k
%o A189711 a189711_row n = map (a189711 n) [3..n-2]
%o A189711 a189711_tabl = map a189711_row [5..]
%o A189711 -- _Reinhard Zumkeller_, May 16 2014
%Y A189711 Cf. A007318.
%K A189711 nonn,easy,nice,tabl
%O A189711 5,1
%A A189711 _Dennis P. Walsh_, Apr 25 2011