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 A364529 #14 Oct 27 2023 08:11:52 %S A364529 1,1,0,2,4,2,0,6,14,8,0,25,60,35,0,114,270,157,0,528,1242,722,0,2481, %T A364529 5826,3390,0,11816,27728,16145,0,56841,133316,77660,0,275485,645878, %U A364529 376382,0,1343083,3148000,1835076,0,6579707,15418652,8990528,0,32363357,75826214 %N A364529 Number of compositions of 2n into n parts where differences between neighboring parts are in {-1,1}. %H A364529 Alois P. Heinz, <a href="/A364529/b364529.txt">Table of n, a(n) for n = 0..2000</a> %F A364529 a(n) = A309938(2n,n). %F A364529 a(n) = 0 <=> n in { A016825 }. %e A364529 a(0) = 1: (), the empty composition. %e A364529 a(1) = 1: [2]. %e A364529 a(3) = 2: [1,2,3], [3,2,1]. %e A364529 a(4) = 4: [1,2,3,2], [2,1,2,3], [2,3,2,1], [3,2,1,2]. %e A364529 a(5) = 2: [2,1,2,3,2], [2,3,2,1,2]. %e A364529 a(7) = 6: [1,2,1,2,3,2,3], [1,2,3,2,1,2,3], [1,2,3,2,3,2,1], [3,2,1,2,1,2,3], [3,2,1,2,3,2,1], [3,2,3,2,1,2,1]. %p A364529 b:= proc(n, i, k) option remember; %p A364529 `if`(n<1 or i<1 or k<0 or 3/2*k>n, 0, %p A364529 `if`(n=i, `if`(k=0, 1, 0), %p A364529 add(b(n-i, i+j, k-1), j=[-1, 1]))) %p A364529 end: %p A364529 a:= n-> `if`(n=0, 1, add(b(2*n, j, n-1), j=1..2*n)): %p A364529 seq(a(n), n=0..48); %t A364529 b[n_, i_, k_] := b[n, i, k] = If[n < 1 || i < 1 || k < 0 || 3/2*k > n, 0, If[n == i, If[k == 0, 1, 0], Sum[b[n - i, i + j, k - 1], {j, {-1, 1}}]]]; %t A364529 a[n_] := If[n == 0, 1, Sum[b[2*n, j, n - 1], {j, 1, 2 n}]]; %t A364529 Table[a[n], {n, 0, 48}] (* _Jean-François Alcover_, Oct 27 2023, after _Alois P. Heinz_ *) %Y A364529 Cf. A016825, A173258, A309938. %K A364529 nonn %O A364529 0,4 %A A364529 _Alois P. Heinz_, Jul 27 2023