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”).
%I #10 Jun 23 2017 08:00:07
%S 1,1,1,1,1,1,1,2,4,7,11,16,22,30,43,66,106,172,275,429,656,996,1522,
%T 2360,3714,5897,9376,14852,23410,36788,57828,91187,144413,229561,
%U 365678,582766,928280,1477877,2353062,3749721,5983631,9562565,15300700,24501417
%N Number of Dyck n-paths all of whose ascents and descents have lengths equal to 1 (mod 6).
%H Alois P. Heinz, <a href="/A212365/b212365.txt">Table of n, a(n) for n = 0..1000</a>
%F G.f. satisfies: A(x) = 1+A(x)*(x-x^6*(1-A(x))).
%F a(n) = a(n-1) + Sum_{k=1..n-6} a(k)*a(n-6-k) if n>0; a(0) = 1.
%e a(0) = 1: the empty path.
%e a(1) = 1: UD.
%e a(6) = 1: UDUDUDUDUDUD.
%e a(7) = 2: UDUDUDUDUDUDUD, UUUUUUUDDDDDDD.
%e a(8) = 4: UDUDUDUDUDUDUDUD, UDUUUUUUUDDDDDDD, UUUUUUUDDDDDDDUD, UUUUUUUDUDDDDDDD.
%p a:= proc(n) option remember;
%p `if`(n=0, 1, a(n-1) +add(a(k)*a(n-6-k), k=1..n-6))
%p end:
%p seq(a(n), n=0..50);
%p # second Maple program:
%p a:= n-> coeff(series(RootOf(A=1+A*(x-x^6*(1-A)), A), x, n+1), x, n):
%p seq(a(n), n=0..50);
%t CoefficientList[Series[(1 - x + x^6 - Sqrt[(1-x+x^6)^2 - 4*x^6])/ (2*x^6), {x, 0, 40}], x] (* _Vaclav Kotesovec_, Sep 02 2014 *)
%Y Column k=6 of A212363.
%K nonn
%O 0,8
%A _Alois P. Heinz_, May 10 2012