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 A247322 #9 Sep 16 2014 02:35:05 %S A247322 1,2,5,9,18,35,67,132,253,495,956,1859,3605,6994,13577,26333,51114, %T A247322 99159,192431,373372,724497,1405819,2727804,5293079,10270553,19929026, %U A247322 38670013,75035105,145597538,282516315,548192811,1063708916,2064013525,4004996055 %N A247322 Number of paths from (0,0) to the line x = n, each consisting of segments given by the vectors (1,1), (1,2), (1,-1), with vertices (i,k) satisfying 0 <= k <= 3. %C A247322 Also, a(n) = number of strings s(0)..s(n) of integers such that s(0) = 0, and for i > 0, s(i) is in {0,1,2,3} and s(i) - s(i-1) is in {-1,1,2} for 1 <= i <= n; also, a(n) = n-th column sum of the array at A247321. %H A247322 Clark Kimberling, <a href="/A247322/b247322.txt">Table of n, a(n) for n = 0..1000</a> %F A247322 A247322(n) = A247323(n) + A247323(n+1) + A247325(n) + A247326(n). %F A247322 Empirically, a(n) = 3*a(n-2) + 2*a(n-3) - a(n-4) and g.f. = (1 + 2*x + 2*x^2 + x^3)/(1 - 3 x^2 - 2 x^3 + x^4). %e A247322 a(2) counts these 5 paths, each represented by a vector sum applied to (0,0): (0,2) + (0,1); (0,1) + (0,2); (0,1) + (0,1); (0,2) + (0,-1), (0,1) + (0,-1). %t A247322 z = 25; t[0, 0] = 1; t[0, 1] = 0; t[0, 2] = 0; t[0, 3] = 0; %t A247322 t[1, 3] = 0; t[n_, 0] := t[n, 0] = t[n - 1, 1]; %t A247322 t[n_, 1] := t[n, 1] = t[n - 1, 0] + t[n - 1, 2]; %t A247322 t[n_, 2] := t[n, 2] = t[n - 1, 0] + t[n - 1, 1] + t[n - 1, 3]; %t A247322 t[n_, 3] := t[n, 3] = t[n - 1, 1] + t[n - 1, 2]; %t A247322 u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, 3}]] (* A247321 *) %t A247322 TableForm[Reverse[Transpose[Table[t[n, k], {n, 0, 12}, {k, 0, 3}]]]] %t A247322 u1 = Table[t[n, k], {n, 0, z}, {k, 0, 3}]; %t A247322 v = Map[Total, u1] (* A247322 column sums *) %Y A247322 Cf. A247049, A247321, A247323, A247325, A247326. %K A247322 nonn,easy %O A247322 0,2 %A A247322 _Clark Kimberling_, Sep 13 2014