login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of length n+1 nonnegative integer arrays starting and ending with 0 with adjacent elements unequal but differing by no more than 3.
1

%I #19 Sep 24 2019 14:31:54

%S 0,3,6,35,138,689,3272,16522,83792,434749,2278888,12093271,64741330,

%T 349470487,1899418046,10387322922,57111322368,315523027610,

%U 1750681516380,9751416039535,54507046599094,305650440453943,1718956630038438

%N Number of length n+1 nonnegative integer arrays starting and ending with 0 with adjacent elements unequal but differing by no more than 3.

%C Column 3 of A205341.

%C Number of excursions (walks starting at the origin, ending on the x-axis, and never go below the x-axis in between) with n steps from {-3,-2,-1,1,2,3}. - _David Nguyen_, Dec 20 2016

%H R. H. Hardin, <a href="/A205336/b205336.txt">Table of n, a(n) for n = 1..210</a>

%H C. Banderier, C. Krattenthaler, A. Krinik, D. Kruchinin, V. Kruchinin, D. Nguyen, and M. Wallner, <a href="https://arxiv.org/abs/1609.06473">Explicit formulas for enumeration of lattice paths: basketball and the kernel method</a>, arXiv preprint arXiv:1609.06473 [math.CO], 2016.

%F a(n) = Sum_{i=1..n}((Sum_{l=0..i}(binomial(i,l)*(Sum_{j=0=(3*(i-l))/7}((-1)^j*binomial(i-l,j)*binomial(-l+3*(-l-2*j+i)-j+i-1,3*(-l-2*j+i)-j)))*(-1)^l))*a(n-i))/n, a(0)=1. - _Vladimir Kruchinin_, Apr 07 2017

%e Some solutions for n=5

%e ..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0

%e ..3....3....3....1....3....1....1....3....3....2....1....3....1....3....3....3

%e ..4....6....2....0....2....3....3....2....5....4....4....1....3....2....2....0

%e ..2....5....5....3....4....4....2....3....4....1....2....2....0....4....0....2

%e ..3....2....2....2....2....1....3....2....2....3....1....1....2....3....2....1

%e ..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0

%t a[n_] := a[n] = If[n == 0, 1, Sum[(Sum[Binomial[i, l] (Sum[(-1)^j Binomial[i - l, j] Binomial[-l + 3(-l - 2j + i) - j + i - 1, 3(-l - 2j + i) - j], {j, 0, (3(i - l))/7}]) (-1)^l, {l, 0, i}]) a[n - i], {i, 1, n}]/n];

%t a /@ Range[1, 23] (* _Jean-François Alcover_, Sep 24 2019, after _Vladimir Kruchinin_ *)

%o (Maxima)

%o a(n):=if n=0 then 1 else sum((sum(binomial(i,l)*(sum((-1)^j*binomial(i-l,j)*binomial(-l+3*(-l-2*j+i)-j+i-1,3*(-l-2*j+i)-j),j,0,(3*(i-l))/7))*(-1)^l,l,0,i))*a(n-i),i,1,n)/n; /* _Vladimir Kruchinin_, Apr 07 2017 */

%K nonn

%O 1,2

%A _R. H. Hardin_, Jan 26 2012