%I #26 Oct 06 2022 16:26:40
%S 1,14,150,1536,15594,158050,1601356,16223814,164366170,1665216896,
%T 16870539234,170917714410,1731590444316,17542976546494,
%U 177730263461890,1800609290091936,18242215773029194,184814350419581330,1872379131238643436,18969325721395559574
%N Number of linearity regions of a max-pooling function with a 3 by n input and 2 by 2 pooling windows.
%C a(n) is also the number of vertices of the Minkowski sum of 2*n-2 simplices conv(e_{i,j},e_{i,j+1},e_{i+1,j},e_{i+1,j+1}) for i=0,1 and j=0,...,n-2, viewing R^(3n) having basis {e_{i,j} | i=0,1,2; j=0,...,n-1}.
%H Laura Escobar, Patricio Gallardo, Javier González-Anaya, José L. González, Guido Montúfar, and Alejandro H. Morales, <a href="https://arxiv.org/abs/2209.14978">Enumeration of max-pooling responses with generalized permutohedra</a>, arXiv:2209.14978 [math.CO], 2022.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (13,-31,20,-4).
%F a(n) = 13*a(n-1) - 31*a(n-2) + 20*a(n-3) - 4*a(n-4) for n>= 5.
%F G.f.: (x+x^2-x^3)/(1-13*x+31*x^2-20*x^3+4*x^4).
%e For n = 2 the a(2)=14 vertices are (00,10), (00,11), (00,20), (00,21), (01,10), (01,11), (01,20), (01,21), (10,10), (10, 20), (10,21), (11,11), (11, 20), (11, 21), where (ij,kl) represents e_{i,j}+e_{k,l}. The pair (10,11) does not represent vertices since e_{1,0}+e_{1,1} is a convex combination of the vectors 2e_{1,0} + 2e_{1,1}. Ditto for the pair (11,10).
%p a:= proc(n) option remember;
%p if n = 1 then
%p return(1);
%p elif n = 2 then
%p return(14);
%p elif n = 3 then
%p return(150);
%p elif n = 4 then
%p return(1536);
%p else
%p return(13*a(n-1) - 31*a(n-2) + 20*a(n-3) - 4*a(n-4));
%p end if;
%p end proc:
%p seq(a(n), n=1..20);
%t LinearRecurrence[{13, -31, 20, -4}, {1, 14, 150, 1536}, 20] (* _Hugo Pfoertner_, Oct 05 2022 *)
%o (Sage)
%o @cached_function
%o def a(n):
%o if n < 5: return [1, 14, 150, 1536][n - 1]
%o return 13*a(n-1) - 31*a(n-2) + 20*a(n-3) - 4*a(n-4)
%o print([a(n) for n in range(1, 21)])
%Y Cf. A007070, A033303.
%K nonn,easy
%O 1,2
%A _Alejandro H. Morales_, Sep 30 2022