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 A339358 #8 Jan 11 2024 09:07:18 %S A339358 32,64,320,576,1696,2816,6400,9984,19392,28800,50304,71808,116160, %T A339358 160512,244992,329472,480480,631488,887744,1144000,1560416,1976832, %U A339358 2629120,3281408,4271488,5261568,6723840,8186112,10294656,12403200,15379968,18356736,22480800,26604864 %N A339358 Maximum number of copies of a 1234567 permutation pattern in an alternating (or zig-zag) permutation of length n + 11. %C A339358 The maximum number of copies of 123 in an alternating permutation is motivated in the Notices reference, and the argument here is analogous. %H A339358 Lara Pudwell, <a href="https://www.ams.org/journals/notices/202007/rnoti-p994.pdf">From permutation patterns to the periodic table</a>, Notices of the American Mathematical Society. 67.7 (2020), 994-1001. %F A339358 a(2n) = 64*A050486(n-1) = 128*C(n+6,7) - 64*C(n+5,6). %F A339358 a(2n-1) = 128*C(n+4,7) + 128*C(n+4,6) + 32*C(n+4,5). %F A339358 D-finite with recurrence (-n+1)*a(n) +2*a(n-1) +16*a(n-2) +2*a(n-3) +(n+7)*a(n-4)=0. - _R. J. Mathar_, Jan 11 2024 %e A339358 a(1) = 32. The alternating permutation of length 1+11=12 with the maximum number of copies of 1234567 is 132547698(11)(10)(12). The 32 copies are 12468(10)(12), 12469(10)(12), 12478(10)(12), 12479(10)(12), 12568(10)(12), 12569(10)(12), 12578(10)(12), 12579(10)(12), 13468(10)(12), 13469(10)(12), 13478(10)(12), 13479(10)(12), 13568(10)(12), 13569(10)(12), 13578(10)(12), 13579(10)(12), 12468(11)(12), 12469(11)(12), 12478(11)(12), 12479(11)(12), 12568(11)(12), 12569(11)(12), 12578(11)(12), 12579(11)(12), 13468(11)(12), 13469(11)(12), 13478(11)(12), 13479(11)(12), 13568(11)(12), 13569(11)(12), 13578(11)(12), and 13579(11)(12). %p A339358 A339358 := proc(n) %p A339358 nhalf := ceil(n/2) ; %p A339358 if type(n,'even') then %p A339358 128*binomial(nhalf+6,7)-64*binomial(nhalf+5,6) ; %p A339358 else %p A339358 128*binomial(nhalf+4,7)+128*binomial(nhalf+4,6)+32*binomial(nhalf+4,5) ; %p A339358 end if; %p A339358 end proc: %p A339358 seq(A339358(n),n=1..40) ; # _R. J. Mathar_, Jan 11 2024 %Y A339358 Cf. A168380. %K A339358 nonn %O A339358 1,1 %A A339358 _Lara Pudwell_, Dec 01 2020