%I #23 Nov 05 2018 03:07:34
%S 1,1,2,4,2,0,2,1,1,2,4,2,6,3,3,3,6,5,6,5,1,0,0,0,0,0,1,6,5,5,3,6,3,5,
%T 5,2,2,4,1,4,4,0,1,1,2,4,2,0,2,1,1,2,4,2,0,2,1,1,2,4,2,6,3,3,3,6,5,6,
%U 5,1,0,0,0,0,0,1,6,5,5,3,6,3,5,5,2,2,4,1,4
%N Motzkin numbers A001006 read mod 7.
%H Rob Burns, <a href="https://arxiv.org/abs/1612.08146">Structure and asymptotics for Motzkin numbers modulo small primes using automata</a>, arXiv:1612.08146 [math.NT], 2016.
%H Anders Hyllengren, <a href="/A258710/a258710.pdf">Letter to N. J. A. Sloane, Oct 04 1985</a>
%t m[0] = 1; m[n_] := m[n] = m[n-1] + Sum[m[k] m[n-k-2], {k, 0, n-2}];
%t a[n_] := Mod[m[n], 7];
%t Array[a, 100, 0] (* _Jean-François Alcover_, Nov 05 2018 *)
%o (PARI) a001006(n) = polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2), n);
%o vector(200, n, n--; a001006(n) % 7) \\ _Altug Alkan_, Oct 23 2015
%Y Cf. A001006.
%Y Motzkin numbers A001006 read mod 2,3,4,5,6,7,8,11: A039963, A039964, A299919, A258712, A299920, A258711, A299918, A258710.
%K nonn
%O 0,3
%A _N. J. A. Sloane_, Jun 14 2015