The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247325 Number of paths from (0,0) to (n,2), with vertices (i,k) satisfying 0 <= k <= 3, consisting of segments given by the vectors (1,1), (1,2), (1,-1). 6

%I #10 Sep 16 2014 02:34:37

%S 0,1,1,4,5,13,22,45,87,166,329,627,1232,2373,4621,8956,17377,33737,

%T 65422,127009,246363,478134,927685,1800119,3492960,6777593,13151433,

%U 25518580,49516525,96081013,186435302,361757509,701951407,1362062118,2642933937,5128331659

%N Number of paths from (0,0) to (n,2), with vertices (i,k) satisfying 0 <= k <= 3, consisting of segments given by the vectors (1,1), (1,2), (1,-1).

%C Also, a(n) = number of strings s(0)..s(n) of integers such that s(0) = 0, s(n) = 2, 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) = row 2 of the array at A247321.

%H Clark Kimberling, <a href="/A247325/b247325.txt">Table of n, a(n) for n = 0..1000</a>

%F Empirically, a(n) = 3*a(n-2) + 2*a(n-3) - a(n-4) and g.f. = (x + x^2 + x^3)/(1 - 3 x^2 - 2 x^3 + x^4).

%e a(4) counts these 4 paths, each represented by a vector sum applied to (0,0):

%e (1,2) + (1,1) + (1,-1);

%e (1,1) + (1,2) + (1,-1);

%e (1,2) + (1,-1) + (1,1);

%e (1,1) + (1,-1) + (1,2).

%t z = 25; t[0, 0] = 1; t[0, 1] = 0; t[0, 2] = 0; t[0, 3] = 0;

%t t[1, 3] = 0; t[n_, 0] := t[n, 0] = t[n - 1, 1];

%t t[n_, 1] := t[n, 1] = t[n - 1, 0] + t[n - 1, 2];

%t t[n_, 2] := t[n, 2] = t[n - 1, 0] + t[n - 1, 1] + t[n - 1, 3];

%t t[n_, 3] := t[n, 3] = t[n - 1, 1] + t[n - 1, 2];

%t Table[t[n, 2], {n, 0, z}]; (* A247325 *)

%Y Cf. A247049, A247321, A247322, A247326.

%K nonn,easy

%O 0,4

%A _Clark Kimberling_, Sep 13 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 2 20:31 EDT 2024. Contains 373045 sequences. (Running on oeis4.)