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 A128742 #23 Jan 13 2022 06:06:12 %S A128742 1,1,2,4,7,13,24,43,78,142,256,463,838,1513,2735,4944,8931,16139, %T A128742 29164,52693,95213,172042,310855,561682,1014898,1833794,3313454, %U A128742 5987026,10817836,19546558,35318325,63816013,115307993,208347899,376459955,680218580,1229074432 %N A128742 Number of compositions of n which avoid the pattern 112. %H A128742 Alois P. Heinz, <a href="/A128742/b128742.txt">Table of n, a(n) for n = 0..1000</a> %H A128742 S. Heubach and T. Mansour, <a href="https://arxiv.org/abs/math/0603285">Enumeration of 3-letter patterns in combinations</a>, arXiv:math/0603285 [math.CO], 2006. %F A128742 G.f.: 1/( 1 - Sum_{j>=1} x^j*Product_{i=1..j-1} (1-x^(2*i)) ). %F A128742 G.f.: 1/( Sum_{k>=0} (-1)^k * x^(k^2) / Product_{j=1..k} (1-x^(2*j-1)) ). - _Seiichi Manyama_, Jan 13 2022 %p A128742 b:= proc(n, t, l) option remember; `if`(n=0, 1, add( %p A128742 b(n-j, is(j=l), j), j=1..min(n, `if`(t, l, n)))) %p A128742 end: %p A128742 a:= n-> b(n, false, 0): %p A128742 seq(a(n), n=0..40); # _Alois P. Heinz_, Oct 24 2017 %t A128742 b[n_, t_, l_] := b[n, t, l] = If[n == 0, 1, Sum[b[n - j, j == l, j], {j, 1, Min[n, If[t, l, n]]}]]; %t A128742 a[n_] := b[n, False, 0]; %t A128742 Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Nov 06 2017, after _Alois P. Heinz_ *) %o A128742 (PARI) my(N=40, x='x+O('x^N)); Vec(1/(1-sum(k=1, N, x^k*prod(j=1, k-1, 1-x^(2*j))))) \\ _Seiichi Manyama_, Jan 13 2022 %o A128742 (PARI) my(N=40, x='x+O('x^N)); Vec(1/sum(k=0, N, (-1)^k*x^k^2/prod(j=1, k, 1-x^(2*j-1)))) \\ _Seiichi Manyama_, Jan 13 2022 %Y A128742 Cf. A003116, A003475. %K A128742 nonn %O A128742 0,3 %A A128742 _Ralf Stephan_, May 08 2007