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 A214254 #16 Oct 14 2024 14:45:33 %S A214254 1,1,1,1,3,2,3,2,6,4,4,3,13,6,5,6,21,10,10,9,33,18,14,15,58,30,19,27, %T A214254 96,51,31,44,159,89,45,77,271,152,66,133,456,263,104,228,768,458,156, %U A214254 395,1310,791,236,685,2228,1371,363,1187,3802,2380,551,2056,6509 %N A214254 Number of compositions of n where differences between neighboring parts are in {-2,2}. %H A214254 Alois P. Heinz, <a href="/A214254/b214254.txt">Table of n, a(n) for n = 0..5000</a> %e A214254 a(7) = 2: [7], [3,1,3]. %e A214254 a(8) = 6: [8], [5,3], [3,5], [3,1,3,1], [2,4,2], [1,3,1,3]. %e A214254 a(9) = 4: [9], [5,3,1], [1,3,5], [1,3,1,3,1]. %p A214254 b:= proc(n, i) option remember; %p A214254 `if`(n<1 or i<1, 0, `if`(n=i, 1, add(b(n-i, i+j), j=[-2, 2]))) %p A214254 end: %p A214254 a:= n-> `if`(n=0, 1, add(b(n, j), j=1..n)): %p A214254 seq(a(n), n=0..80); %t A214254 b[n_, i_] := b[n, i] = If[n < 1 || i < 1, 0, If[n == i, 1, Sum[b[n-i, i+j], { j, {-2, 2}}]]]; a[n_] := If[n == 0, 1, Sum[b[n, j], {j, 1, n}]]; Table [a[n], {n, 0, 80}] // Flatten (* _Jean-François Alcover_, Dec 13 2013, translated from Maple *) %Y A214254 Column k=2 of A214247. %K A214254 nonn %O A214254 0,5 %A A214254 _Alois P. Heinz_, Jul 08 2012