cp's OEIS Frontend

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.

A247352 Rectangular array read by upwards by columns: T = T(n,k) = number of paths from (0,1) to (n,k), where 0 <= k <= 3, consisting of segments given by the vectors (1,1), (1,2), (1,-1).

This page as a plain text file.
%I A247352 #9 Sep 18 2014 05:15:29
%S A247352 0,1,0,0,1,0,1,1,0,2,2,1,2,2,3,4,2,5,8,5,5,10,12,13,10,17,28,22,17,38,
%T A247352 49,45,38,66,100,87,66,138,191,166,138,257,370,329,257,508,724,627,
%U A247352 508,981,1392,1232,981,1900,2721,2373,1900,3702,5254,4621,3702
%N A247352 Rectangular array read by upwards by columns: T = T(n,k) = number of paths from (0,1) to (n,k), where 0 <= k <= 3, consisting of segments given by the vectors (1,1), (1,2), (1,-1).
%C A247352 Also, T(n,k) = number of strings s(0)..s(n) of integers such that s(0) = 1, s(n) = k, 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.
%H A247352 Clark Kimberling, <a href="/A247352/b247352.txt">Table of n, a(n) for n = 0..1000</a>
%F A247352 The four rows and column sums all empirically satisfy the linear recurrence r(n) = 3*r(n-2) + 2*r(n-3) - r(n-4), with g.f. of the form p(x)/q(x), where q(x) = 1 - 3 x^2 - 2 x^3 + x^4.  Initial terms and p(x) follow:
%F A247352 (row 0, the bottom row):  0,1,0,2; x - x^3
%F A247352 (row 1):  1,0,0,2; 1 - x^2
%F A247352 (row 2):  0,1,2,3; x +2*x^2
%F A247352 (row 3):  0,1,1,4; x + x^2 + x^3
%F A247352 (n-th column sum) = 1,3,5,11; 1 + 3*x + 2*x^2.
%e A247352 First 10 columns:
%e A247352 0 .. 1 .. 1 .. 4 .. 5 .. 13 .. 22 .. 45 .. 87 ... 166
%e A247352 0 .. 1 .. 2 .. 3 .. 8 .. 12 .. 28 .. 49 .. 100 .. 191
%e A247352 1 .. 0 .. 2 .. 2 .. 5 .. 10 .. 17 .. 38 .. 66 ... 138
%e A247352 0 .. 1 .. 0 .. 2 .. 2 .. 5 ... 10 .. 17 .. 38 ... 66
%e A247352 T(5,0) counts these 5 paths, given as vector sums applied to (0,1):
%e A247352 (1,1) + (1,1) + (1,-1) + (1,-1) + (1 -1)
%e A247352 (1,1) + (1,-1) + (1,1) + (1,-1) + (1,-1)
%e A247352 (1,-1) + (1,1) + (1,1) + (1,-1) + (1,-1)
%e A247352 (1,1) + (1,-1) + (1,-1) + (1,1) + (1,-1)
%e A247352 (1,-1) + (1,1) + (1,-1) + (1,1) + (1,-1)
%e A247352 Partial sums of second components in each vector sum give the 3 integer strings described in comments:
%e A247352 (1,2,3,2,1,0),
%e A247352 (1,2,1,2,1,0),
%e A247352 (1,0,1,2,1,0),
%e A247352 (1,2,1,0,1,0),
%e A247352 (1,0,1,0,1,0).
%t A247352 z = 50; t[0, 0] = 0; t[0, 1] = 1; t[0, 2] = 0; t[0, 3] = 0;
%t A247352 t[1, 3] = 1; t[n_, 0] := t[n, 0] = t[n - 1, 1];
%t A247352 t[n_, 1] := t[n, 1] = t[n - 1, 0] + t[n - 1, 2]
%t A247352 t[n_, 2] := t[n, 2] = t[n - 1, 0] + t[n - 1, 1] + t[n - 1, 3]
%t A247352 t[n_, 3] := t[n, 3] = t[n - 1, 1] + t[n - 1, 2]
%t A247352 u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, 3}]] (* A247352 *)
%t A247352 TableForm[Reverse[Transpose[Table[t[n, k], {n, 0, 12}, {k, 0, 3}]]]] (* array  *)
%t A247352 v = Map[Total, u1]  (* A247353 *)
%t A247352 Table[t[n, 0], {n, 0, z}]   (* row 0, A247354*)
%t A247352 Table[t[n, 1], {n, 0, z}]   (* row 1, cf. row 0 *)
%t A247352 Table[t[n, 2], {n, 0, z}]   (* row 2, A247355 *)
%t A247352 Table[t[n, 3], {n, 0, z}]   (* row 3, A247325 *)
%Y A247352 Cf.  A247049, A247321, A247353, A247354, A247355.
%K A247352 nonn,tabl,easy
%O A247352 0,10
%A A247352 _Clark Kimberling_, Sep 15 2014